From: Eric Leblond Date: Tue, 31 May 2016 13:55:31 +0000 (+0200) Subject: util-ioctcl: increase header size X-Git-Tag: suricata-3.1RC1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4defc5acc21e92b53d6993e6133871e3636a9193;p=thirdparty%2Fsuricata.git util-ioctcl: increase header size Headers can contain VLAN or Qing so we need to increase the value returned by GetIfaceMaxHWHeaderLength. --- diff --git a/src/util-ioctl.c b/src/util-ioctl.c index e0b5ef824b..9371846036 100644 --- a/src/util-ioctl.c +++ b/src/util-ioctl.c @@ -61,13 +61,16 @@ int GetIfaceMaxHWHeaderLength(const char *pcap_dev) || (!strcmp("tap", pcap_dev)) || - (!strcmp("lo", pcap_dev))) - return ETHERNET_HEADER_LEN; + (!strcmp("lo", pcap_dev))) { + /* Add possible VLAN tag or Qing headers */ + return 8 + ETHERNET_HEADER_LEN; + } if (!strcmp("ppp", pcap_dev)) return SLL_HEADER_LEN; - /* SLL_HEADER_LEN is the biggest one */ - return SLL_HEADER_LEN; + /* SLL_HEADER_LEN is the biggest one and + add possible VLAN tag and Qing headers */ + return 8 + SLL_HEADER_LEN; } /**