Module Name: src Committed By: maxv Date: Sun Apr 15 07:35:49 UTC 2018
Modified Files: src/sys/kern: uipc_mbuf.c src/sys/netinet: ip_input.c src/sys/netinet6: ip6_input.c src/sys/netipsec: ipsec_input.c src/sys/sys: mbuf.h Log Message: Introduce a m_verify_packet function, that verifies the mbuf chain of a packet to ensure it is not malformed. Call this function in "points of interest", that are the IPv4/IPv6/IPsec entry points. There could be more. We use M_VERIFY_PACKET(m), declared under DIAGNOSTIC only. This function should not be called everywhere, especially not in places that temporarily manipulate (and clobber) the mbuf structure; once they're done they put the mbuf back in a correct format. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/kern/uipc_mbuf.c cvs rdiff -u -r1.379 -r1.380 src/sys/netinet/ip_input.c cvs rdiff -u -r1.196 -r1.197 src/sys/netinet6/ip6_input.c cvs rdiff -u -r1.62 -r1.63 src/sys/netipsec/ipsec_input.c cvs rdiff -u -r1.185 -r1.186 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.