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
pull/9267/head
Cole Dishington 2 years ago committed by Victor Julien
parent fdf9cdf400
commit 1b08c561f6

@ -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)); DecodeIP6inIP6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p));
return TM_ECODE_OK; return TM_ECODE_OK;
case IPPROTO_GRE: case IPPROTO_GRE:
IPV6_SET_L4PROTO(p, IPPROTO_GRE);
DecodeGRE(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p)); DecodeGRE(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p));
break; break;
case IPPROTO_FRAGMENT: case IPPROTO_FRAGMENT:

Loading…
Cancel
Save