From 91f8c33b0abbf216fe4f9a147c1824e902ed3d8e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 10 Feb 2014 10:57:46 +0100 Subject: [PATCH] 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. --- src/decode.c | 3 +++ 1 file changed, 3 insertions(+) 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"); }