]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
afpacket: strip prio from vlan id
authorVictor Julien <victor@inliniac.net>
Tue, 15 Mar 2016 17:00:54 +0000 (18:00 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 15 Mar 2016 17:00:54 +0000 (18:00 +0100)
src/source-af-packet.c

index 9ae4643d99043ff6d5c711e33d72e0a3efffdb57..3267b6c17248eae3c58a7ccf913afad379a8cf7f 100644 (file)
@@ -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;
         }