]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
decoder/ipv6: minor cleanups
authorVictor Julien <victor@inliniac.net>
Sun, 30 Jun 2019 08:26:24 +0000 (10:26 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 1 Jul 2019 13:44:30 +0000 (15:44 +0200)
Remove unused field and macros.

Minor code style cleanups.

src/decode-ipv6.c
src/decode-ipv6.h

index ce97b501ffbc7545e5ba8d5d56699cf31f713001..bb00449ac0345b951bb85554ca5d176ee3ed29ce 100644 (file)
@@ -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;
index cf35402a2b03856890f43cf1c1b2c93cafc16163..17b79babd44a4a928682bc8eedcf4900b445ac54 100644 (file)
@@ -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)