From: Victor Julien Date: Wed, 27 Mar 2024 11:14:06 +0000 (+0100) Subject: decode/icmpv6: remove unused error_ptr field X-Git-Tag: suricata-8.0.0-beta1~1389 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18d49c27ae29101b439b068b04ed0672f3ae763f;p=thirdparty%2Fsuricata.git decode/icmpv6: remove unused error_ptr field Was only set, never checked. Part of effort to make Packet more compact. Ticket: #6938. --- diff --git a/src/decode-icmpv6.c b/src/decode-icmpv6.c index 0832414979..8286bda535 100644 --- a/src/decode-icmpv6.c +++ b/src/decode-icmpv6.c @@ -249,7 +249,6 @@ int DecodeICMPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, if (unlikely(len > ICMPV6_HEADER_LEN + USHRT_MAX)) { return TM_ECODE_FAILED; } - p->icmpv6vars.error_ptr= ICMPV6_GET_ERROR_PTR(p); DecodePartialIPV6(p, (uint8_t *)(pkt + ICMPV6_HEADER_LEN), (uint16_t)(len - ICMPV6_HEADER_LEN)); full_hdr = 1; diff --git a/src/decode-icmpv6.h b/src/decode-icmpv6.h index f12dc10043..ff5359eeca 100644 --- a/src/decode-icmpv6.h +++ b/src/decode-icmpv6.h @@ -113,9 +113,7 @@ /** If message is Error */ /** macro for icmpv6 "unused" access */ -#define ICMPV6_GET_UNUSED(p) (p)->icmpv6h->icmpv6b.icmpv6e.unused -/** macro for icmpv6 "error_ptr" access */ -#define ICMPV6_GET_ERROR_PTR(p) (p)->icmpv6h->icmpv6b.icmpv6e.error_ptr +#define ICMPV6_GET_UNUSED(p) (p)->icmpv6h->icmpv6b.icmpv6e.unused /** macro for icmpv6 "mtu" accessibility */ // ICMPv6 has MTU only for type too big #define ICMPV6_HAS_MTU(p) ((p)->icmpv6h->type == ICMP6_PACKET_TOO_BIG) @@ -156,8 +154,7 @@ typedef struct ICMPV6Vars_ { /* checksum of the icmpv6 packet */ uint16_t id; uint16_t seq; - uint32_t mtu; - uint32_t error_ptr; + uint32_t mtu; /** Pointers to the embedded packet headers */ IPV6Hdr *emb_ipv6h;