From: Cole Dishington Date: Mon, 10 Jul 2023 02:02:18 +0000 (+1200) Subject: decode-ipv6: Set L4 proto on ipv6 incase of GRE decode error X-Git-Tag: suricata-7.0.1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9267%2Fhead;p=thirdparty%2Fsuricata.git decode-ipv6: Set L4 proto on ipv6 incase of GRE decode error Set the L4 proto before decoding GRE in ipv6 decoding in case there is a GRE header decoding error. Bug: #6222 --- diff --git a/src/decode-ipv6.c b/src/decode-ipv6.c index 769b967ba1..4becd06338 100644 --- a/src/decode-ipv6.c +++ b/src/decode-ipv6.c @@ -614,6 +614,7 @@ int DecodeIPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t * DecodeIP6inIP6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p)); return TM_ECODE_OK; case IPPROTO_GRE: + IPV6_SET_L4PROTO(p, IPPROTO_GRE); DecodeGRE(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p)); break; case IPPROTO_FRAGMENT: