From: Victor Julien Date: Tue, 15 Mar 2016 17:00:54 +0000 (+0100) Subject: afpacket: strip prio from vlan id X-Git-Tag: suricata-3.0.1RC1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01a8cc4ec9466ff4d35c75f17f5ef5d0f4193b7c;p=thirdparty%2Fsuricata.git afpacket: strip prio from vlan id --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 9ae4643d99..3267b6c172 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -811,7 +811,7 @@ int AFPReadFromRing(AFPThreadVars *ptv) /* get vlan id from header */ if ((!ptv->vlan_disabled) && (h.h2->tp_status & TP_STATUS_VLAN_VALID || h.h2->tp_vlan_tci)) { - p->vlan_id[0] = h.h2->tp_vlan_tci; + p->vlan_id[0] = h.h2->tp_vlan_tci & 0x0fff; p->vlan_idx = 1; p->vlanh[0] = NULL; }