]> git.ozlabs.org Git - ppp.git/commitdiff
Ignore NAK'd options we don't recognize.
authorPaul Mackerras <paulus@samba.org>
Thu, 10 Aug 1995 06:51:06 +0000 (06:51 +0000)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 Aug 1995 06:51:06 +0000 (06:51 +0000)
pppd/ipcp.c
pppd/lcp.c

index 112def979666ec79395711d8b2965022b1d0c9b4..3d99235440b2d5a6a6a9ea97f8193679b02b9e6f 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.19 1995/06/01 01:30:38 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.20 1995/08/10 06:51:04 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -584,8 +584,6 @@ ipcp_nakci(f, p, len)
                try.neg_addr = 1;
            no.neg_addr = 1;
            break;
                try.neg_addr = 1;
            no.neg_addr = 1;
            break;
-       default:
-           goto bad;
        }
        p = next;
     }
        }
        p = next;
     }
index 74a3235cc0c552fff070981152cc2fcfced3f68f..f9d6c1cc9b9c2fd91bae5f623ae987085a4d5313 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: lcp.c,v 1.20 1995/06/30 01:47:15 paulus Exp $";
+static char rcsid[] = "$Id: lcp.c,v 1.21 1995/08/10 06:51:06 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -878,11 +878,13 @@ lcp_nakci(f, p, len)
      * `let me authenticate myself with you' which is a bit pointless.
      * For the quality protocol, the Nak means `ask me to send you quality
      * reports', but if we didn't ask for them, we don't want them.
      * `let me authenticate myself with you' which is a bit pointless.
      * For the quality protocol, the Nak means `ask me to send you quality
      * reports', but if we didn't ask for them, we don't want them.
+     * An option we don't recognize represents the peer asking to
+     * negotiate some option we don't support, so ignore it.
      */
     while (len > CILEN_VOID) {
        GETCHAR(citype, p);
        GETCHAR(cilen, p);
      */
     while (len > CILEN_VOID) {
        GETCHAR(citype, p);
        GETCHAR(cilen, p);
-       if( (len -= cilen) < 0 )
+       if ((len -= cilen) < 0)
            goto bad;
        next = p + cilen - 2;
 
            goto bad;
        next = p + cilen - 2;
 
@@ -918,8 +920,6 @@ lcp_nakci(f, p, len)
            if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR)
                goto bad;
            break;
            if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR)
                goto bad;
            break;
-       default:
-           goto bad;
        }
        p = next;
     }
        }
        p = next;
     }