summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-04-04 00:53:03 -0700
committerGuy Harris <guy@alum.mit.edu>2014-04-04 00:53:03 -0700
commit5cdf53e257a7e947e1e72b590eea8c1471b9be6c (patch)
tree9f8f60beae27f8ed2936faced17d2e6c036671bc
parent32938f947fe3ac8d2f7fff6242abbcfcff7cc007 (diff)
downloadtcpdump-5cdf53e257a7e947e1e72b590eea8c1471b9be6c.tar.gz
Define NETDISSECT_REWORKED in a bunch of files, and fix the issues it finds.
The only one it found was that routines in sigsecret.c needed to refer to ndo->ndo_sigsecret, not just sigsecret.
-rw-r--r--af.c1
-rw-r--r--bpf_dump.c1
-rw-r--r--checksum.c1
-rw-r--r--cpack.c1
-rw-r--r--gmpls.c1
-rw-r--r--gmt2local.c1
-rw-r--r--in_cksum.c1
-rw-r--r--ipproto.c1
-rw-r--r--l2vpn.c1
-rw-r--r--nlpid.c1
-rw-r--r--oui.c1
-rw-r--r--parsenfsfh.c1
-rw-r--r--print-pktap.c1
-rw-r--r--signature.c7
-rw-r--r--util.c1
15 files changed, 18 insertions, 3 deletions
diff --git a/af.c b/af.c
index 2a2159d7..bea6d977 100644
--- a/af.c
+++ b/af.c
@@ -15,6 +15,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/bpf_dump.c b/bpf_dump.c
index 05ae760a..2ef85283 100644
--- a/bpf_dump.c
+++ b/bpf_dump.c
@@ -19,6 +19,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/checksum.c b/checksum.c
index 9d5daa8b..e451bdd4 100644
--- a/checksum.c
+++ b/checksum.c
@@ -17,6 +17,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpack.c b/cpack.c
index b863d8e7..3cbb9f92 100644
--- 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 b4837a1e..c9fd9bb8 100644
--- a/gmpls.c
+++ b/gmpls.c
@@ -13,6 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/gmt2local.c b/gmt2local.c
index 2ab9c102..6958f66a 100644
--- a/gmt2local.c
+++ b/gmt2local.c
@@ -19,6 +19,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/in_cksum.c b/in_cksum.c
index 93cdfc9a..b81f2baf 100644
--- a/in_cksum.c
+++ b/in_cksum.c
@@ -35,6 +35,7 @@
* @(#)in_cksum.c 8.1 (Berkeley) 6/10/93
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/ipproto.c b/ipproto.c
index 8143eda8..e44b7481 100644
--- a/ipproto.c
+++ b/ipproto.c
@@ -13,6 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/l2vpn.c b/l2vpn.c
index e9b72fff..54037aa1 100644
--- a/l2vpn.c
+++ b/l2vpn.c
@@ -13,6 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/nlpid.c b/nlpid.c
index b9d59c4c..919e87dd 100644
--- a/nlpid.c
+++ b/nlpid.c
@@ -13,6 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/oui.c b/oui.c
index b170b0eb..a6d5787f 100644
--- a/oui.c
+++ b/oui.c
@@ -13,6 +13,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/parsenfsfh.c b/parsenfsfh.c
index fb79333d..a86a4316 100644
--- a/parsenfsfh.c
+++ b/parsenfsfh.c
@@ -40,6 +40,7 @@
* Western Research Laboratory
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/print-pktap.c b/print-pktap.c
index 55425330..46a187de 100644
--- a/print-pktap.c
+++ b/print-pktap.c
@@ -19,6 +19,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/signature.c b/signature.c
index c35b7838..c3520a08 100644
--- a/signature.c
+++ b/signature.c
@@ -15,6 +15,7 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#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 4304e519..7f4a3785 100644
--- 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