diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index aa33da91..d6c5d223 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -352,7 +352,7 @@ ip6_reass(struct pbuf *p) } memset(ipr, 0, sizeof(struct ip6_reassdata)); - ipr->timer = IP_REASS_MAXAGE; + ipr->timer = IPV6_REASS_MAXAGE; /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index f7cad2db..86b7c171 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -2281,6 +2281,15 @@ #define LWIP_IPV6 0 #endif +/** + * IPV6_REASS_MAXAGE: Maximum time (in multiples of IP6_REASS_TMR_INTERVAL - so seconds, normally) + * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived + * in this time, the whole packet is discarded. + */ +#if !defined IPV6_REASS_MAXAGE || defined __DOXYGEN__ +#define IPV6_REASS_MAXAGE 60 +#endif + /** * LWIP_IPV6_SCOPES==1: Enable support for IPv6 address scopes, ensuring that * e.g. link-local addresses are really treated as link-local. Disable this