diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-10 14:28:16 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1997-08-10 14:28:16 +0000 |
| commit | 16e2a68bff4a853c36f17fbb2a6ef1102af5dcaf (patch) | |
| tree | 4315d8aec073b19a61b57c01540d39959a02ca8f /sys/net/if_spppsubr.c | |
| parent | edb398d7d9ac4cfad246401bdfa082a7bd43ecce (diff) | |
Notes
Diffstat (limited to 'sys/net/if_spppsubr.c')
| -rw-r--r-- | sys/net/if_spppsubr.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index c1bfb6520f59..606493285af1 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -17,7 +17,7 @@ * * From: Version 1.9, Wed Oct 4 18:58:15 MSK 1995 * - * $Id: if_spppsubr.c,v 1.22 1997/05/23 20:40:15 joerg Exp $ + * $Id: if_spppsubr.c,v 1.23 1997/08/06 01:43:09 itojun Exp $ */ #include <sys/param.h> @@ -1810,13 +1810,22 @@ sppp_lcp_RCR(struct sppp *sp, struct lcp_header *h, int len) rlen += p[1]; } if (rlen) { - if (debug) - addlog(" send conf-nak\n"); - sppp_cp_send (sp, PPP_LCP, CONF_NAK, h->ident, rlen, buf); + if (++sp->fail_counter[IDX_LCP] >= sp->lcp.max_failure) { + if (debug) + addlog(" max_failure (%d) exceeded, " + "send conf-rej\n", + sp->lcp.max_failure); + sppp_cp_send(sp, PPP_LCP, CONF_REJ, h->ident, rlen, buf); + } else { + if (debug) + addlog(" send conf-nak\n"); + sppp_cp_send (sp, PPP_LCP, CONF_NAK, h->ident, rlen, buf); + } return 0; } else { if (debug) addlog(" send conf-ack\n"); + sp->fail_counter[IDX_LCP] = 0; sp->pp_loopcnt = 0; sppp_cp_send (sp, PPP_LCP, CONF_ACK, h->ident, origlen, h+1); |
