]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
defrag: fix argument used in macro to match signature 2627/head
authorJason Ish <ish@unx.ca>
Mon, 20 Mar 2017 16:54:51 +0000 (10:54 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 28 Mar 2017 12:44:44 +0000 (14:44 +0200)
"p" was being used in the macro but was not an argument to
the macro, but it worked due to the context of the macro.

Use the actual macro argument, d2, instead of p.

Results in no change to generated code.

src/defrag-hash.c

index 736099c58761058109931134cb06744878843604..a5355ebda06bb45cb7140f3a25e13142e5fdc187 100644 (file)
@@ -407,7 +407,7 @@ static inline uint32_t DefragHashGetKey(Packet *p)
        CMP_ADDR(&(d1)->dst_addr, &(d2)->dst)) || \
       (CMP_ADDR(&(d1)->src_addr, &(d2)->dst) && \
        CMP_ADDR(&(d1)->dst_addr, &(d2)->src))) && \
-     (d1)->proto == IP_GET_IPPROTO(p) &&        \
+     (d1)->proto == IP_GET_IPPROTO(d2) &&   \
      (d1)->id == (id) && \
      (d1)->vlan_id[0] == (d2)->vlan_id[0] && \
      (d1)->vlan_id[1] == (d2)->vlan_id[1])