Skip to content

Commit

Permalink
decode-ipv6: Set IPv6 proto incase of ext header parsing error
Browse files Browse the repository at this point in the history
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.

Bug: OISF#6086.
  • Loading branch information
coledishington authored and victorjulien committed Jun 8, 2023
1 parent cb1e7a9 commit 531d99f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/decode-ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 531d99f

Please sign in to comment.