]> git.ozlabs.org Git - ppp.git/commitdiff
allow peer to give endpoint even if we're not doing multilink;
authorPaul Mackerras <paulus@samba.org>
Mon, 24 Apr 2000 07:41:09 +0000 (07:41 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 24 Apr 2000 07:41:09 +0000 (07:41 +0000)
fix demand dialling where we ask for multilink and don't get it.

pppd/lcp.c
pppd/multilink.c

index f0e453db458c5d9f465c5b16af8fc3f28e6f2236..026b301356e0fd6170408300525bebb41e57bb80 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: lcp.c,v 1.52 2000/04/15 01:27:12 masputra Exp $"
+#define RCSID  "$Id: lcp.c,v 1.53 2000/04/24 07:41:09 paulus Exp $"
 
 /*
  * TODO:
 
 /*
  * TODO:
@@ -323,9 +323,7 @@ lcp_init(unit)
 #ifdef CBCP_SUPPORT
     ao->neg_cbcp = 1;
 #endif
 #ifdef CBCP_SUPPORT
     ao->neg_cbcp = 1;
 #endif
-#ifdef HAVE_MULTILINK
     ao->neg_endpoint = 1;
     ao->neg_endpoint = 1;
-#endif
 
     BZERO(xmit_accm[unit], sizeof(xmit_accm[0]));
     xmit_accm[unit][3] = 0x60000000;
 
     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 *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;
 
     wo->magicnumber = magic();
     wo->numloops = 0;
@@ -567,6 +566,8 @@ lcp_resetci(f)
        go->neg_ssnhf = 0;
        go->neg_endpoint = 0;
     }
        go->neg_ssnhf = 0;
        go->neg_endpoint = 0;
     }
+    if (noendpoint)
+       ao->neg_endpoint = 0;
     peer_mru[f->unit] = PPP_MRU;
     auth_reset(f->unit);
 }
     peer_mru[f->unit] = PPP_MRU;
     auth_reset(f->unit);
 }
@@ -1640,7 +1641,7 @@ lcp_reqci(f, inp, lenp, reject_if_disagree)
            break;
 
        case CI_EPDISC:
            break;
 
        case CI_EPDISC:
-           if (!ao->neg_endpoint || !multilink ||
+           if (!ao->neg_endpoint ||
                cilen < CILEN_CHAR ||
                cilen > CILEN_CHAR + MAX_ENDP_LEN) {
                orc = CONFREJ;
                cilen < CILEN_CHAR ||
                cilen > CILEN_CHAR + MAX_ENDP_LEN) {
                orc = CONFREJ;
index 81528bb23a1a069f6965e7ca528a4168f0f35637..c0ad23790cbbbff92f8238c942d891b1d4ea5440 100644 (file)
@@ -96,6 +96,11 @@ mp_join_bundle()
                if (go->neg_mrru)
                        notice("oops, multilink negotiated only for receive");
                multilink = 0;
                if (go->neg_mrru)
                        notice("oops, multilink negotiated only for receive");
                multilink = 0;
+               if (demand) {
+                       /* already have a bundle */
+                       cfg_bundle(0, 0, 0, 0);
+                       return 0;
+               }
                make_new_bundle(0, 0, 0, 0);
                set_ifunit(1);
                return 0;
                make_new_bundle(0, 0, 0, 0);
                set_ifunit(1);
                return 0;