From 54a3eda4e0907544076c673739ade6179e3c9e6a Mon Sep 17 00:00:00 2001 From: Cole Dishington Date: Wed, 24 May 2023 12:39:33 +1200 Subject: [PATCH] decode-ipv6: Set IPv6 proto incase of ext header parsing error Set the IPv6 packet proto before parsing the ext headers, similar to decode-ipv4, incase of an ext header parsing error. Otherwise rule decode-events are not triggered for packets encapsulated in IPv6. --- src/decode-ipv6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/decode-ipv6.c b/src/decode-ipv6.c index 7629a7c4672c..769b967ba13b 100644 --- a/src/decode-ipv6.c +++ b/src/decode-ipv6.c @@ -574,6 +574,7 @@ int DecodeIPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t * CLEAR_IPV6_PACKET(p); return TM_ECODE_FAILED; } + p->proto = IPV6_GET_NH(p); #ifdef DEBUG if (SCLogDebugEnabled()) { /* only convert the addresses if debug is really enabled */