]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: fix reassembly with vlan
authorVictor Julien <victor@inliniac.net>
Mon, 10 Feb 2014 09:57:46 +0000 (10:57 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 10 Feb 2014 09:57:46 +0000 (10:57 +0100)
When creating a pseudo packet with the reassembled IP packet, the
parent's vlan id or id's are also needed. The defrag packet is run
through decode and the flow engine, where the vlan id is necessary
for connecting the packet to the correct flow.

src/decode.c

index dc0d886dc349b01fff563917410c5abb8d61f6ba..74a36763c2964c654bc45e04224098b09fc245da 100644 (file)
@@ -331,6 +331,9 @@ Packet *PacketDefragPktSetup(Packet *parent, uint8_t *pkt, uint16_t len, uint8_t
     p->datalink = DLT_RAW;
     /* tell new packet it's part of a tunnel */
     SET_TUNNEL_PKT(p);
+    p->vlan_id[0] = parent->vlan_id[0];
+    p->vlan_id[1] = parent->vlan_id[1];
+    p->vlan_idx = parent->vlan_idx;
 
     SCReturnPtr(p, "Packet");
 }