]> git.ozlabs.org Git - ppp.git/commitdiff
nodeflatedraft option; small change to ms-dns and ms-wins options.
authorPaul Mackerras <paulus@samba.org>
Wed, 25 Mar 1998 01:29:05 +0000 (01:29 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 25 Mar 1998 01:29:05 +0000 (01:29 +0000)
pppd/options.c

index d8c39837381e977449d7aca007bd3f354d0badb1..ae12981dffdf34681dc4a0ec441687ffda7b09db 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.40 1997/11/27 06:09:34 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.41 1998/03/25 01:29:05 paulus Exp $";
 #endif
 
 #include <ctype.h>
@@ -215,6 +215,7 @@ static int setbsdcomp __P((char **));
 static int setnobsdcomp __P((char **));
 static int setdeflate __P((char **));
 static int setnodeflate __P((char **));
+static int setnodeflatedraft __P((char **));
 static int setdemand __P((char **));
 static int setpred1comp __P((char **));
 static int setnopred1comp __P((char **));
@@ -368,6 +369,7 @@ static struct cmd {
     {"deflate", 1, setdeflate},                /* request Deflate compression */
     {"nodeflate", 0, setnodeflate},    /* don't allow Deflate compression */
     {"-deflate", 0, setnodeflate},     /* don't allow Deflate compression */
+    {"nodeflatedraft", 0, setnodeflatedraft}, /* don't use draft deflate # */
     {"predictor1", 0, setpred1comp},   /* request Predictor-1 */
     {"nopredictor1", 0, setnopred1comp},/* don't allow Predictor-1 */
     {"-predictor1", 0, setnopred1comp},        /* don't allow Predictor-1 */
@@ -2249,6 +2251,15 @@ setnodeflate(argv)
     return 1;
 }
 
+static int
+setnodeflatedraft(argv)
+    char **argv;
+{
+    ccp_wantoptions[0].deflate_draft = 0;
+    ccp_allowoptions[0].deflate_draft = 0;
+    return 1;
+}
+
 static int
 setpred1comp(argv)
     char **argv;
@@ -2320,11 +2331,12 @@ setdnsaddr(argv)
        dns = *(u_int32_t *)hp->h_addr;
     }
 
-    if (ipcp_allowoptions[0].dnsaddr[0] == 0) {
+    /* if there is no primary then update it. */
+    if (ipcp_allowoptions[0].dnsaddr[0] == 0)
        ipcp_allowoptions[0].dnsaddr[0] = dns;
-    } else {
-       ipcp_allowoptions[0].dnsaddr[1] = dns;
-    }
+
+    /* always set the secondary address value to the same value. */
+    ipcp_allowoptions[0].dnsaddr[1] = dns;
 
     return (1);
 }
@@ -2351,11 +2363,12 @@ setwinsaddr(argv)
        wins = *(u_int32_t *)hp->h_addr;
     }
 
-    if (ipcp_allowoptions[0].winsaddr[0] == 0) {
+    /* if there is no primary then update it. */
+    if (ipcp_allowoptions[0].winsaddr[0] == 0)
        ipcp_allowoptions[0].winsaddr[0] = wins;
-    } else {
-       ipcp_allowoptions[0].winsaddr[1] = wins;
-    }
+
+    /* always set the secondary address value to the same value. */
+    ipcp_allowoptions[0].winsaddr[1] = wins;
 
     return (1);
 }
@@ -2451,6 +2464,7 @@ setipxanet(argv)
 {
     ipxcp_wantoptions[0].accept_network = 1;
     ipxcp_allowoptions[0].accept_network = 1;
+    return 1;
 }
 
 static int
@@ -2459,6 +2473,7 @@ setipxalcl(argv)
 {
     ipxcp_wantoptions[0].accept_local = 1;
     ipxcp_allowoptions[0].accept_local = 1;
+    return 1;
 }
 
 static int
@@ -2467,6 +2482,7 @@ setipxarmt(argv)
 {
     ipxcp_wantoptions[0].accept_remote = 1;
     ipxcp_allowoptions[0].accept_remote = 1;
+    return 1;
 }
 
 static u_char *