From: Victor Julien Date: Mon, 10 Feb 2014 09:57:46 +0000 (+0100) Subject: defrag: fix reassembly with vlan X-Git-Tag: suricata-2.0rc1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91f8c33b0abbf216fe4f9a147c1824e902ed3d8e;p=thirdparty%2Fsuricata.git defrag: fix reassembly with vlan 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. --- diff --git a/src/decode.c b/src/decode.c index dc0d886dc3..74a36763c2 100644 --- a/src/decode.c +++ b/src/decode.c @@ -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"); }