From 84970da775d84a8b5e92499112e9d5392614e5ac Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Wed, 1 Oct 2025 15:04:41 -0300 Subject: [PATCH] decode/ipv6: flag invalid pkt w/ wrong ip ver event When the decoder finds a packet with wrong IP version for IPv4|IPv6-in-IPv6 tunnels, it would set an event, but wouldn't flag the packet invalid. This fixes that. Bug #7964 (cherry picked from commit ee7f01c83f61a0a1e7728dfe330720670790458a) --- src/decode-ipv6.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decode-ipv6.c b/src/decode-ipv6.c index 5e5e730f19..4426e9ba17 100644 --- a/src/decode-ipv6.c +++ b/src/decode-ipv6.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2024 Open Information Security Foundation +/* Copyright (C) 2007-2025 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -58,7 +58,7 @@ static void DecodeIPv4inIPv6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, c } FlowSetupPacket(p); } else { - ENGINE_SET_EVENT(p, IPV4_IN_IPV6_WRONG_IP_VER); + ENGINE_SET_INVALID_EVENT(p, IPV4_IN_IPV6_WRONG_IP_VER); } } @@ -83,7 +83,7 @@ static int DecodeIP6inIP6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, } FlowSetupPacket(p); } else { - ENGINE_SET_EVENT(p, IPV6_IN_IPV6_WRONG_IP_VER); + ENGINE_SET_INVALID_EVENT(p, IPV6_IN_IPV6_WRONG_IP_VER); } return TM_ECODE_OK; }