Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjtl <jtl@FreeBSD.org>2018-08-14 20:26:07 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-24 16:00:04 +0300
commit0e5c59050d22b22ef6a1f37163040505cb6161f0 (patch)
treef741f539f4443804f697652873267e7268541235 /newlib/libc/sys/rtems
parent215e33310b623f58fc5ddd5c678e99f449a13419 (diff)
Add a limit of the number of fragments per IPv6 packet.
The IPv4 fragment reassembly code supports a limit on the number of fragments per packet. The default limit is currently 17 fragments. Among other things, this limit serves to limit the number of fragments the code must parse when trying to reassembly a packet. Add a limit to the IPv6 reassembly code. By default, limit a packet to 65 fragments (64 on the queue, plus one final fragment to complete the packet). This allows an average fragment size of 1,008 bytes, which should be sufficient to hold a fragment. (Recall that the IPv6 minimum MTU is 1280 bytes. Therefore, this configuration allows a full-size IPv6 packet to be fragmented on a link with the minimum MTU and still carry approximately 272 bytes of headers before the fragmented portion of the packet.) Users can adjust this limit using the net.inet6.ip6.maxfragsperpacket sysctl. Reviewed by: jhb Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923
Diffstat (limited to 'newlib/libc/sys/rtems')
-rw-r--r--newlib/libc/sys/rtems/include/netinet6/in6.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/sys/rtems/include/netinet6/in6.h b/newlib/libc/sys/rtems/include/netinet6/in6.h
index 37e1e93c0..235c9902a 100644
--- a/newlib/libc/sys/rtems/include/netinet6/in6.h
+++ b/newlib/libc/sys/rtems/include/netinet6/in6.h
@@ -642,7 +642,8 @@ struct ip6_mtuinfo {
#define IPV6CTL_INTRQMAXLEN 51 /* max length of IPv6 netisr queue */
#define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr
* queue */
-#define IPV6CTL_MAXID 53
+#define IPV6CTL_MAXFRAGSPERPACKET 53 /* Max fragments per packet */
+#define IPV6CTL_MAXID 54
#endif /* __BSD_VISIBLE */
/*