]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/lcp.c
MP-related code should be wrapped within HAVE_MULTILINK pre-processor
[ppp.git] / pppd / lcp.c
index 1241bfbe6a3b787ecd93382390b193a950a007c5..f933b590fddf91fb608fa302bf7d91b2c267d760 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: lcp.c,v 1.50 2000/04/05 00:58:28 paulus Exp $";
+#define RCSID  "$Id: lcp.c,v 1.54 2000/04/27 03:51:18 masputra Exp $"
 
 /*
  * TODO:
@@ -96,7 +96,7 @@ static option_t lcp_option_list[] = {
       "Set passive mode", 1 },
     { "silent", o_bool, &lcp_wantoptions[0].silent,
       "Set silent mode", 1 },
-    { "escape", o_special, setescape,
+    { "escape", o_special, (void *)setescape,
       "List of character codes to escape on transmission" },
     { "lcp-echo-failure", o_int, &lcp_echo_fails,
       "Set number of consecutive echo failures to indicate link failure" },
@@ -323,9 +323,7 @@ lcp_init(unit)
 #ifdef CBCP_SUPPORT
     ao->neg_cbcp = 1;
 #endif
-#ifdef HAVE_MULTILINK
     ao->neg_endpoint = 1;
-#endif
 
     BZERO(xmit_accm[unit], sizeof(xmit_accm[0]));
     xmit_accm[unit][3] = 0x60000000;
@@ -558,6 +556,7 @@ lcp_resetci(f)
 {
     lcp_options *wo = &lcp_wantoptions[f->unit];
     lcp_options *go = &lcp_gotoptions[f->unit];
+    lcp_options *ao = &lcp_allowoptions[f->unit];
 
     wo->magicnumber = magic();
     wo->numloops = 0;
@@ -567,6 +566,10 @@ lcp_resetci(f)
        go->neg_ssnhf = 0;
        go->neg_endpoint = 0;
     }
+#ifdef HAVE_MULTILINK
+    if (noendpoint)
+       ao->neg_endpoint = 0;
+#endif /* HAVE_MULTILINK */
     peer_mru[f->unit] = PPP_MRU;
     auth_reset(f->unit);
 }
@@ -1640,7 +1643,7 @@ lcp_reqci(f, inp, lenp, reject_if_disagree)
            break;
 
        case CI_EPDISC:
-           if (!ao->neg_endpoint || !multilink ||
+           if (!ao->neg_endpoint ||
                cilen < CILEN_CHAR ||
                cilen > CILEN_CHAR + MAX_ENDP_LEN) {
                orc = CONFREJ;
@@ -1955,6 +1958,7 @@ lcp_printpkt(p, plen, printer, arg)
                }
                break;
            case CI_EPDISC:
+#ifdef HAVE_MULTILINK
                if (olen >= CILEN_CHAR) {
                    struct epdisc epd;
                    p += 2;
@@ -1968,6 +1972,9 @@ lcp_printpkt(p, plen, printer, arg)
                    }
                    printer(arg, "endpoint [%s]", epdisc_to_str(&epd));
                }
+#else
+               printer(arg, "endpoint");
+#endif
                break;
            }
            while (p < optend) {
@@ -1982,7 +1989,7 @@ lcp_printpkt(p, plen, printer, arg)
     case TERMREQ:
        if (len > 0 && *p >= ' ' && *p < 0x7f) {
            printer(arg, " ");
-           print_string(p, len, printer, arg);
+           print_string((char *)p, len, printer, arg);
            p += len;
            len = 0;
        }