Fix improper L4 header handling for IPv6 packets passed via DLT_RAW.

Reported by:     Emil Muratov <gpm@hotplug.ru>
Reviewed by:     glebius
Approved by:     ae(mentor)
MFC after:       1 week
This commit is contained in:
Alexander V. Chernikov 2012-06-16 13:51:01 +00:00
parent 17ec7b7aa8
commit f75083f064
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237162

View File

@ -712,7 +712,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
if (ip->ip_v == IP6VERSION) {
/* IPv6 packet */
ip = NULL;
M_CHECK(sizeof(struct ip6_hdr));
M_CHECK(sizeof(struct ip6_hdr) - sizeof(struct ip));
ip6 = mtod(m, struct ip6_hdr *);
}
#endif