X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..a39ff7e25e19b3a8c3020042a3872ca9ec9659f1:/bsd/netinet/in_proto.c?ds=sidebyside diff --git a/bsd/netinet/in_proto.c b/bsd/netinet/in_proto.c index bb0fee864..4a9d19819 100644 --- a/bsd/netinet/in_proto.c +++ b/bsd/netinet/in_proto.c @@ -73,6 +73,7 @@ #include #include +#include #include #include @@ -302,6 +303,13 @@ in_dinit(struct domain *dp) inetdomain = dp; + /* + * Verify that the maximum possible tcp/ip header will still + * fit in a small mbuf because m_pullup only puls into 256 + * byte mbuf + */ + _CASSERT((sizeof(struct tcpiphdr) + TCP_MAXOLEN) <= _MHLEN); + /* * Attach first, then initialize; ip_init() needs raw IP handler. */