moved hide_password global variable to ppp_options

This commit is contained in:
Sylvain Rochet 2012-06-09 17:05:19 +02:00
parent c2d2034ae8
commit 1cceb4e0ad
3 changed files with 4 additions and 9 deletions

View File

@ -662,8 +662,6 @@ static void ppp_input(int unit, void *arg) {
goto drop; goto drop;
} }
/* FIXME: add a phase per connection */
/* /*
* Until we get past the authentication phase, toss all packets * Until we get past the authentication phase, toss all packets
* except LCP, LQR and authentication 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(ouraddr);
LWIP_UNUSED_ARG(gateway); LWIP_UNUSED_ARG(gateway);
/* FIXME: handle replace condition */
LWIP_UNUSED_ARG(replace); LWIP_UNUSED_ARG(replace);
if (unit < 0 || unit >= NUM_PPP || !pc->open_flag) { if (unit < 0 || unit >= NUM_PPP || !pc->open_flag) {

View File

@ -414,6 +414,9 @@ struct ppp_settings {
u_int usehostname : 1; /* Use hostname for our_name */ u_int usehostname : 1; /* Use hostname for our_name */
u_int usepeerdns : 1; /* Ask peer for DNS adds */ u_int usepeerdns : 1; /* Ask peer for DNS adds */
u_int persist : 1; /* Persist mode, always try to reopen the connection */ 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) */ u16_t listen_time; /* time to listen first (ms) */

View File

@ -56,11 +56,6 @@
#include "upap.h" #include "upap.h"
/* FIXME: move that to ppp_options */
#if PRINTPKT_SUPPORT
static bool hide_password = 1;
#endif /* PRINTPKT_SUPPORT */
#if PPP_OPTIONS #if PPP_OPTIONS
/* /*
* Command-line options. * Command-line options.
@ -693,7 +688,7 @@ upap_printpkt(p, plen, printer, arg)
printer(arg, " user="); printer(arg, " user=");
print_string(user, ulen, printer, arg); print_string(user, ulen, printer, arg);
printer(arg, " password="); printer(arg, " password=");
if (!hide_password) if (!ppp_settings.hide_password)
print_string(pwd, wlen, printer, arg); print_string(pwd, wlen, printer, arg);
else else
printer(arg, "<hidden>"); printer(arg, "<hidden>");