diff options
author | joerg <joerg@FreeBSD.org> | 2001-04-08 20:29:09 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 2001-04-08 20:29:09 +0000 |
commit | 2dea5ee6644879fa9c6ff4d0a371deacc27cfa0a (patch) | |
tree | aa61f9ee9d20851a3acb4d759f13398b445de5f2 /sys/net/if_spppsubr.c | |
parent | 1c1d868e786417d56cdae2344a3cd0d71f032765 (diff) | |
download | FreeBSD-src-2dea5ee6644879fa9c6ff4d0a371deacc27cfa0a.zip FreeBSD-src-2dea5ee6644879fa9c6ff4d0a371deacc27cfa0a.tar.gz |
Move the decision whether we want to request authentication from our
peer out from sppp_lcp_open() to sppp_lcp_up(). For one, this makes
things look more symmetrical to sppp_lcp_close(), and somehow it also
just occurred to me that an Up event following the open caused the
value of the authentication option to be clobbered.
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index d4bdcec..6928c95 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1859,6 +1859,14 @@ sppp_lcp_up(struct sppp *sp) sp->lcp.protos = 0; sp->lcp.mru = sp->lcp.their_mru = PP_MTU; /* + * If we are authenticator, negotiate LCP_AUTH + */ + if (sp->hisauth.proto != 0) + sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO); + else + sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO); + sp->pp_flags &= ~PP_NEEDAUTH; + /* * If this interface is passive or dial-on-demand, and we are * still in Initial state, it means we've got an incoming * call. Activate the interface. @@ -1914,14 +1922,6 @@ sppp_lcp_down(struct sppp *sp) static void sppp_lcp_open(struct sppp *sp) { - /* - * If we are authenticator, negotiate LCP_AUTH - */ - if (sp->hisauth.proto != 0) - sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO); - else - sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO); - sp->pp_flags &= ~PP_NEEDAUTH; sppp_open_event(&lcp, sp); } |