detect: apply drops to tunnel root

`PacketDrop` applied a DROP to the current packet unconditionally,
while in tunnel/encapsulated cases the DROP should have been applied
to the root packet.

Fixes: 6742ecbc9e ("decode: make PacketDrop use action as parameter")

Bug: #5600.
pull/8177/head
Victor Julien 3 years ago
parent bcd8d7d6c4
commit 778faaed96

@ -916,7 +916,7 @@ static inline void PacketDrop(Packet *p, const uint8_t action, enum PacketDropRe
if (p->drop_reason == PKT_DROP_REASON_NOT_SET)
p->drop_reason = (uint8_t)r;
PACKET_UPDATE_ACTION(p, action);
PacketUpdateAction(p, action);
}
#define PACKET_DROP(p) PacketDrop((p), PKT_DROP_REASON_NOT_SET)

Loading…
Cancel
Save