From: yasuoka Date: Thu, 25 Jun 2015 02:25:33 +0000 (+0000) Subject: Reset the LCP option state for dialin-proxy only if re-negotiation is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6c0d88bb52d37c388823032a4df3be41950f59c2;p=openbsd Reset the LCP option state for dialin-proxy only if re-negotiation is enabled. --- 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. *
@@ -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;
 	}