From 1cceb4e0ad967f185a5e3ed203ed9bb86e4c1199 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 9 Jun 2012 17:05:19 +0200 Subject: [PATCH] moved hide_password global variable to ppp_options --- src/netif/ppp/ppp.c | 3 --- src/netif/ppp/ppp_impl.h | 3 +++ src/netif/ppp/upap.c | 7 +------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 4ab02f2e..06d4ce93 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -662,8 +662,6 @@ static void ppp_input(int unit, void *arg) { goto drop; } - /* FIXME: add a phase per connection */ - /* * Until we get past the authentication phase, toss all packets * except LCP, LQR and authentication packets. @@ -2146,7 +2144,6 @@ int sifdefaultroute(int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace LWIP_UNUSED_ARG(ouraddr); LWIP_UNUSED_ARG(gateway); - /* FIXME: handle replace condition */ LWIP_UNUSED_ARG(replace); if (unit < 0 || unit >= NUM_PPP || !pc->open_flag) { diff --git a/src/netif/ppp/ppp_impl.h b/src/netif/ppp/ppp_impl.h index 2ecbd500..b6247c0b 100644 --- a/src/netif/ppp/ppp_impl.h +++ b/src/netif/ppp/ppp_impl.h @@ -414,6 +414,9 @@ struct ppp_settings { u_int usehostname : 1; /* Use hostname for our_name */ u_int usepeerdns : 1; /* Ask peer for DNS adds */ u_int persist : 1; /* Persist mode, always try to reopen the connection */ +#if PRINTPKT_SUPPORT + u_int hide_password : 1; /* Hide password in dumped packets */ +#endif /* PRINTPKT_SUPPORT */ u16_t listen_time; /* time to listen first (ms) */ diff --git a/src/netif/ppp/upap.c b/src/netif/ppp/upap.c index 2e49854d..61a46eb7 100644 --- a/src/netif/ppp/upap.c +++ b/src/netif/ppp/upap.c @@ -56,11 +56,6 @@ #include "upap.h" -/* FIXME: move that to ppp_options */ -#if PRINTPKT_SUPPORT -static bool hide_password = 1; -#endif /* PRINTPKT_SUPPORT */ - #if PPP_OPTIONS /* * Command-line options. @@ -693,7 +688,7 @@ upap_printpkt(p, plen, printer, arg) printer(arg, " user="); print_string(user, ulen, printer, arg); printer(arg, " password="); - if (!hide_password) + if (!ppp_settings.hide_password) print_string(pwd, wlen, printer, arg); else printer(arg, "");