]> git.ozlabs.org Git - ppp.git/commitdiff
Ignore extra unrecognized options in Nak.
authorPaul Mackerras <paulus@samba.org>
Fri, 19 Mar 1999 01:19:31 +0000 (01:19 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 19 Mar 1999 01:19:31 +0000 (01:19 +0000)
change order of args to strlcpy/strlcat.

pppd/ccp.c
pppd/ipcp.c

index 05cca767093158ca9b61d95360803ac3d92aa7fc..7eae64d1c374aa23264d4f484f46faa78b0ac46b 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ccp.c,v 1.26 1999/03/16 22:54:38 paulus Exp $";
+static char rcsid[] = "$Id: ccp.c,v 1.27 1999/03/19 01:19:30 paulus Exp $";
 #endif
 
 #include <stdlib.h>
@@ -708,12 +708,9 @@ ccp_nakci(f, p, len)
     /*
      * Predictor-1 and 2 have no options, so they can't be Naked.
      *
-     * XXX What should we do with any remaining options?
+     * There may be remaining options but we ignore them.
      */
 
-    if (len != 0)
-       return 0;
-
     if (f->state != OPENED)
        *go = try;
     return 1;
@@ -1034,7 +1031,7 @@ ccp_up(f)
            if (go->method == ho->method) {
                notice("%s compression enabled", method_name(go, ho));
            } else {
-               strlcpy(method1, sizeof(method1), method_name(go, NULL));
+               strlcpy(method1, method_name(go, NULL), sizeof(method1));
                notice("%s / %s compression enabled",
                       method1, method_name(ho, NULL));
            }
index a0956d9903884a52b5d352daa978d7d1062d3658..6e0346b77df1a9e919151dd977081b12057dc3db 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: ipcp.c,v 1.41 1999/03/16 22:54:38 paulus Exp $";
+static char rcsid[] = "$Id: ipcp.c,v 1.42 1999/03/19 01:19:31 paulus Exp $";
 #endif
 
 /*
@@ -848,12 +848,9 @@ ipcp_nakci(f, p, len)
        p = next;
     }
 
-    /* If there is still anything left, this packet is bad. */
-    if (len != 0)
-       goto bad;
-
     /*
      * OK, the Nak is good.  Now we can update state.
+     * If there are any remaining options, we ignore them.
      */
     if (f->state != OPENED)
        *go = try;