Check that we have first fragment before pulling up TCP/UDP header.

This commit is contained in:
Gleb Smirnoff 2005-07-17 08:09:59 +00:00
parent 85ef2343c4
commit ed2fc9673b

View File

@ -528,6 +528,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
break;
}
if ((ip->ip_off & htons(IP_OFFMASK)) == 0) {
/*
* In case of IP header with options, we haven't pulled
* up enough, yet.
@ -542,6 +543,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
M_CHECK(sizeof(struct udphdr));
break;
}
}
switch (iface->info.ifinfo_dlt) {
case DLT_EN10MB: