PPPoE is now guessing its MTU from the underlying netif MTU (in most cases 1500 minus 8 = 1492, which is the most common PPPoE MTU)

This commit is contained in:
Sylvain Rochet
2012-06-05 22:22:35 +02:00
parent 7d7513c71c
commit 2e227f868b
2 changed files with 2 additions and 9 deletions

View File

@@ -609,12 +609,12 @@ int ppp_over_ethernet_open(struct netif *ethif, const char *service_name, const
pc->link_status_cb = link_status_cb;
pc->link_status_ctx = link_status_ctx;
lcp_wantoptions[pd].mru = PPPOE_MAXMTU;
lcp_wantoptions[pd].mru = ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */
lcp_wantoptions[pd].neg_asyncmap = 0;
lcp_wantoptions[pd].neg_pcompression = 0;
lcp_wantoptions[pd].neg_accompression = 0;
lcp_allowoptions[pd].mru = PPPOE_MAXMTU;
lcp_allowoptions[pd].mru = ethif->mtu-PPPOE_HEADERLEN-2; /* two byte PPP protocol discriminator, then IP data */
lcp_allowoptions[pd].neg_asyncmap = 0;
lcp_allowoptions[pd].neg_pcompression = 0;
lcp_allowoptions[pd].neg_accompression = 0;