diff options
author | brian <brian@FreeBSD.org> | 1999-06-09 16:54:04 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-06-09 16:54:04 +0000 |
commit | 9c856b76928d18953093a30f09943c472d2ffd53 (patch) | |
tree | 418ce5ce129798b29481c14cfd5182fabfc51ad2 /usr.sbin/ppp/lcp.c | |
parent | ecc920d2f92aa35dc7619422c2e2edd8a18aa3ea (diff) | |
download | FreeBSD-src-9c856b76928d18953093a30f09943c472d2ffd53.zip FreeBSD-src-9c856b76928d18953093a30f09943c472d2ffd53.tar.gz |
Allow our endpoint discriminator to be enabled, disabled, accepted
and denied. This is necessary for some MP implementations that
get confused if you accept their endpoint discriminator but reject
their MRRU.
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r-- | usr.sbin/ppp/lcp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index e225f5c..7b07d4a 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.74 1999/05/09 20:02:21 brian Exp $ + * $Id: lcp.c,v 1.75 1999/06/02 15:59:02 brian Exp $ * */ @@ -424,7 +424,8 @@ LcpSendConfigReq(struct fsm *fp) } mp = &lcp->fsm.bundle->ncp.mp; - if (mp->cfg.enddisc.class != 0 && !REJECTED(lcp, TY_ENDDISC)) { + if (mp->cfg.enddisc.class != 0 && IsEnabled(mp->cfg.negenddisc) && + !REJECTED(lcp, TY_ENDDISC)) { *o->data = mp->cfg.enddisc.class; memcpy(o->data+1, mp->cfg.enddisc.address, mp->cfg.enddisc.len); INC_LCP_OPT(TY_ENDDISC, mp->cfg.enddisc.len + 3, o); @@ -1059,7 +1060,9 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type, if (!p) { log_Printf(LogLCP, " ENDDISC rejected - not a physical link\n"); goto reqreject; - } else if (length-3 < sizeof p->dl->peer.enddisc.address && + } else if (!IsAccepted(mp->cfg.negenddisc)) + goto reqreject; + else if (length-3 < sizeof p->dl->peer.enddisc.address && cp[2] <= MAX_ENDDISC_CLASS) { p->dl->peer.enddisc.class = cp[2]; p->dl->peer.enddisc.len = length-3; @@ -1079,7 +1082,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type, } break; - case MODE_NAK: /* Treat this as a REJ, we don't vary our disc */ + case MODE_NAK: /* Treat this as a REJ, we don't vary our disc (yet) */ case MODE_REJ: lcp->his_reject |= (1 << type); break; |