mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-13 02:05:43 +00:00
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:
parent
7d7513c71c
commit
2e227f868b
@ -133,13 +133,6 @@ PACK_STRUCT_END
|
||||
#define PPPOE_CODE_PADS 0x65 /* Active Discovery Session confirmation */
|
||||
#define PPPOE_CODE_PADT 0xA7 /* Active Discovery Terminate */
|
||||
|
||||
#ifndef ETHERMTU
|
||||
#define ETHERMTU 1500
|
||||
#endif
|
||||
|
||||
/* two byte PPP protocol discriminator, then IP data */
|
||||
#define PPPOE_MAXMTU (ETHERMTU-PPPOE_HEADERLEN-2)
|
||||
|
||||
#ifndef PPPOE_MAX_AC_COOKIE_LEN
|
||||
#define PPPOE_MAX_AC_COOKIE_LEN 64
|
||||
#endif
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user