From: Victor Julien Date: Sun, 30 Jun 2019 08:26:24 +0000 (+0200) Subject: decoder/ipv6: minor cleanups X-Git-Tag: suricata-5.0.0-rc1~226 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9252400f680433002b172bc7ce8dc81eb860a801;p=thirdparty%2Fsuricata.git decoder/ipv6: minor cleanups Remove unused field and macros. Minor code style cleanups. --- diff --git a/src/decode-ipv6.c b/src/decode-ipv6.c index ce97b501ff..bb00449ac0 100644 --- a/src/decode-ipv6.c +++ b/src/decode-ipv6.c @@ -44,9 +44,6 @@ #include "util-profiling.h" #include "host.h" -#define IPV6_EXTHDRS ip6eh.ip6_exthdrs -#define IPV6_EH_CNT ip6eh.ip6_exthdrs_cnt - /** * \brief Function to decode IPv4 in IPv6 packets * @@ -583,12 +580,10 @@ static int DecodeIPV6Packet (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, u int DecodeIPV6(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, uint16_t len, PacketQueue *pq) { - int ret; - StatsIncr(tv, dtv->counter_ipv6); /* do the actual decoding */ - ret = DecodeIPV6Packet (tv, dtv, p, pkt, len); + int ret = DecodeIPV6Packet (tv, dtv, p, pkt, len); if (unlikely(ret < 0)) { p->ip6h = NULL; return TM_ECODE_FAILED; diff --git a/src/decode-ipv6.h b/src/decode-ipv6.h index cf35402a2b..17b79babd4 100644 --- a/src/decode-ipv6.h +++ b/src/decode-ipv6.h @@ -99,7 +99,6 @@ typedef struct IPV6Hdr_ /* helper structure with parsed ipv6 info */ typedef struct IPV6Vars_ { - uint8_t ip_opts_len; uint8_t l4proto; /* the proto after the extension headers * store while decoding so we don't have * to loop through the exthdrs all the time */ @@ -107,7 +106,6 @@ typedef struct IPV6Vars_ #define CLEAR_IPV6_PACKET(p) do { \ (p)->ip6h = NULL; \ - (p)->ip6vars.ip_opts_len = 0; \ (p)->ip6vars.l4proto = 0; \ memset(&(p)->ip6eh, 0x00, sizeof((p)->ip6eh)); \ } while (0)