X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fmultilink.c;h=e5f2ac40d80098f15bc0f89ef007c4c47350be88;hp=cb6bd106d1061e72d081741cfc4c134a06200df6;hb=734747f7ef4d64cc7f92ea953c4ab57581c01f8f;hpb=0ee3b432e6ff5fabcddb8ea4e234f3efc44ba09d diff --git a/pppd/multilink.c b/pppd/multilink.c index cb6bd10..e5f2ac4 100644 --- a/pppd/multilink.c +++ b/pppd/multilink.c @@ -71,9 +71,6 @@ mp_check_options() if (!wo->neg_endpoint && !noendpoint) { /* get a default endpoint value */ wo->neg_endpoint = get_default_epdisc(&wo->endpoint); - if (wo->neg_endpoint) - dbglog("using default endpoint %s", - epdisc_to_str(&wo->endpoint)); } } @@ -86,8 +83,9 @@ mp_join_bundle() { lcp_options *go = &lcp_gotoptions[0]; lcp_options *ho = &lcp_hisoptions[0]; + lcp_options *ao = &lcp_allowoptions[0]; int unit, pppd_pid; - int l; + int l, mtu; char *p; TDB_DATA key, pid, rec; @@ -95,13 +93,18 @@ mp_join_bundle() /* not doing multilink */ if (go->neg_mrru) notice("oops, multilink negotiated only for receive"); + mtu = ho->neg_mru? ho->mru: PPP_MRU; + if (mtu > ao->mru) + mtu = ao->mru; if (demand) { /* already have a bundle */ cfg_bundle(0, 0, 0, 0); + netif_set_mtu(0, mtu); return 0; } make_new_bundle(0, 0, 0, 0); set_ifunit(1); + netif_set_mtu(0, mtu); return 0; } @@ -134,8 +137,10 @@ mp_join_bundle() * For demand mode, we only need to configure the bundle * and attach the link. */ + mtu = MIN(ho->mrru, ao->mru); if (demand) { cfg_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); + netif_set_mtu(0, mtu); script_setenv("BUNDLE", bundle_id + 7, 1); return 0; } @@ -179,6 +184,7 @@ mp_join_bundle() /* we have to make a new bundle */ make_new_bundle(go->mrru, ho->mrru, go->neg_ssnhf, ho->neg_ssnhf); set_ifunit(1); + netif_set_mtu(0, mtu); script_setenv("BUNDLE", bundle_id + 7, 1); tdb_writeunlock(pppdb); info("New bundle %s created", ifname);