diff options
author | 2015-06-25 02:25:33 +0000 | |
---|---|---|
committer | 2015-06-25 02:25:33 +0000 | |
commit | 6c0d88bb52d37c388823032a4df3be41950f59c2 (patch) | |
tree | d8e0ed417622f4096ae5f3ebb21a604e4109b766 | |
parent | Put fts_close() where missing. (diff) | |
download | wireguard-openbsd-6c0d88bb52d37c388823032a4df3be41950f59c2.tar.xz wireguard-openbsd-6c0d88bb52d37c388823032a4df3be41950f59c2.zip |
Reset the LCP option state for dialin-proxy only if re-negotiation is
enabled.
-rw-r--r-- | usr.sbin/npppd/npppd/lcp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/npppd/npppd/lcp.c b/usr.sbin/npppd/npppd/lcp.c index d5a44d5040f..c4e9a3db639 100644 --- a/usr.sbin/npppd/npppd/lcp.c +++ b/usr.sbin/npppd/npppd/lcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lcp.c,v 1.11 2015/06/24 04:45:20 yasuoka Exp $ */ +/* $OpenBSD: lcp.c,v 1.12 2015/06/25 02:25:33 yasuoka Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Id: lcp.c,v 1.11 2015/06/24 04:45:20 yasuoka Exp $ */ +/* $Id: lcp.c,v 1.12 2015/06/25 02:25:33 yasuoka Exp $ */ /**@file * This file provides LCP related functions. *<pre> @@ -272,7 +272,12 @@ static void lcp_resetci(fsm *f) { LCP_ASSERT(f != NULL); - if (f->ppp->lcp.dialin_proxy == 0) { + + /* Unless doing dialin-proxy without re-negotiation */ + if (!(f->ppp->lcp.dialin_proxy != 0 && + f->ppp->lcp.dialin_proxy_lcp_renegotiation == 0)) { + + /* Reset the LCP options' state */ memset(&f->ppp->lcp.opt, 0, sizeof(f->ppp->lcp.opt)); f->ppp->lcp.auth_order[0] = -1; } |