Fixed PBUF_LINK_ENCAPSULATION_HLEN support

PBUF_LINK_ENCAPSULATION_HLEN support was introduced by 6ef7563f and
missed the fact that header size calculation/reservation using
computation like PBUF_LINK_HLEN + PBUF_IP_HLEN + ... are used all over
the source code. Hopefully fixed all of them.
This commit is contained in:
Sylvain Rochet
2015-04-20 23:43:33 +02:00
parent 2db7513590
commit 632de523de
8 changed files with 23 additions and 19 deletions

View File

@@ -3123,7 +3123,7 @@ ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value)
* The current solution is to calculate for 2 simultaneous packets...
*/
*sint_ptr = (IP_HLEN + ((IP_REASS_MAX_PBUFS/2) *
(PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN - IP_HLEN)));
(PBUF_POOL_BUFSIZE - PBUF_LINK_ENCAPSULATION_HLEN - PBUF_LINK_HLEN - IP_HLEN)));
#else
/** @todo returning MTU would be a bad thing and
returning a wild guess like '576' isn't good either */