]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Define NETDISSECT_REWORKED in a bunch of files, and fix the issues it finds.
authorGuy Harris <[email protected]>
Fri, 4 Apr 2014 07:53:03 +0000 (00:53 -0700)
committerGuy Harris <[email protected]>
Fri, 4 Apr 2014 07:53:03 +0000 (00:53 -0700)
The only one it found was that routines in sigsecret.c needed to refer
to ndo->ndo_sigsecret, not just sigsecret.

15 files changed:
af.c
bpf_dump.c
checksum.c
cpack.c
gmpls.c
gmt2local.c
in_cksum.c
ipproto.c
l2vpn.c
nlpid.c
oui.c
parsenfsfh.c
print-pktap.c
signature.c
util.c

diff --git a/af.c b/af.c
index 2a2159d75bb77ba299f3da215f073eac3b9b4296..bea6d977763fcddd0798f1856965dacffff65672 100644 (file)
--- a/af.c
+++ b/af.c
@@ -15,6 +15,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 05ae760a8f29e0a0005e0d82d47114cd4fae55a5..2ef852834085d882777dd25d4324bb26eda8ce6f 100644 (file)
@@ -19,6 +19,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 9d5daa8b9ce1a4771f83f1ff9b8cdc6e9f16dcf3..e451bdd43061cfae1f21ada854af57aa87fa2506 100644 (file)
@@ -17,6 +17,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/cpack.c b/cpack.c
index b863d8e71fb55b029ee32bb8e3725bad3aee81d4..3cbb9f92f3eb5604861f14cfc58540efaf95a43f 100644 (file)
--- a/cpack.c
+++ b/cpack.c
@@ -27,6 +27,7 @@
  * OF SUCH DAMAGE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/gmpls.c b/gmpls.c
index b4837a1eb58db6a44e6de1f6bf3c3ea1964b0302..c9fd9bb8ac6c56db6af7315bdc73f28ba6bd79d8 100644 (file)
--- a/gmpls.c
+++ b/gmpls.c
@@ -13,6 +13,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 2ab9c102d4fc9e4ac07ded917c1254fb816b7cdd..6958f66a464019ddfcf44890d86016011159889f 100644 (file)
@@ -19,6 +19,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 93cdfc9aad98d7e28b50443754eb4c401b5dad80..b81f2baf1c911905b93a61c0ff3dd2b0a4a80178 100644 (file)
@@ -35,6 +35,7 @@
  *     @(#)in_cksum.c  8.1 (Berkeley) 6/10/93
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 8143eda8d2e73b9b044f87419a7e3e5de63f453e..e44b74814bb4ea564a907f105ffb8370046122e7 100644 (file)
--- a/ipproto.c
+++ b/ipproto.c
@@ -13,6 +13,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/l2vpn.c b/l2vpn.c
index e9b72fff502269bd6d9cb7732c4921c66411c776..54037aa19bc35391a6758006a259dc1e95fecec2 100644 (file)
--- a/l2vpn.c
+++ b/l2vpn.c
@@ -13,6 +13,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/nlpid.c b/nlpid.c
index b9d59c4c8212d3ad5eee5652cbd332c8abb88bc2..919e87dd4ae8cc1faf683b4c8e2cf1409dddc8dd 100644 (file)
--- a/nlpid.c
+++ b/nlpid.c
@@ -13,6 +13,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/oui.c b/oui.c
index b170b0ebcbf9bc10c4a851aaa727d5cae2ff7563..a6d5787f79b92bcee540eb92036b9ebf9b82bba7 100644 (file)
--- a/oui.c
+++ b/oui.c
@@ -13,6 +13,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index fb79333db8f510c104e7e52fe02082ccfd12eabe..a86a43168f86e46cd44fa27cf99484c0bc362954 100644 (file)
@@ -40,6 +40,7 @@
  * Western Research Laboratory
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 554253303e5379a4ef6ce5b90882ad8d932c9651..46a187de2f33df4bf4517b484d446318ce38f170 100644 (file)
@@ -19,6 +19,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
index c35b78383f8b895f69b1292405dfc1461c36b1a7..c3520a087b6c6a487e76249ceb6eb671b1a7bef8 100644 (file)
@@ -15,6 +15,7 @@
  * Original code by Hannes Gredler ([email protected])
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -128,12 +129,12 @@ signature_verify(netdissect_options *ndo,
     memcpy(rcvsig, sig_ptr, sizeof(rcvsig));
     memset(sig_ptr, 0, sizeof(rcvsig));
 
-    if (!sigsecret) {
+    if (!ndo->ndo_sigsecret) {
         return (CANT_CHECK_SIGNATURE);
     }
 
-    signature_compute_hmac_md5(pptr, plen, (unsigned char *)sigsecret,
-                               strlen(sigsecret), sig);
+    signature_compute_hmac_md5(pptr, plen, (unsigned char *)ndo->ndo_sigsecret,
+                               strlen(ndo->ndo_sigsecret), sig);
 
     if (memcmp(rcvsig, sig, sizeof(sig)) == 0) {
         return (SIGNATURE_VALID);
diff --git a/util.c b/util.c
index 4304e519875d7499dfd101064406fa2d529f97ee..7f4a3785926d409ed851e167607d7fdcc9c6a840 100644 (file)
--- a/util.c
+++ b/util.c
@@ -19,6 +19,7 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif