summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2011-09-17 15:59:45 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2011-09-17 15:59:45 +0000
commit22e725eda5ca4436c36a53fbca3ea39031870e6a (patch)
treef2a7d75162e22ba24a4c5289e0c527d846049f8c /usr.sbin
parentd323f76fc6c844c6d76a8bf3e4f5a189ac0a9b29 (diff)
access a 32-bit field as u_int32_t, not as u_long; ok bluhm@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/tcpdump/print-icmp6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/tcpdump/print-icmp6.c b/usr.sbin/tcpdump/print-icmp6.c
index dffec6c35cf..b8609b041e1 100644
--- a/usr.sbin/tcpdump/print-icmp6.c
+++ b/usr.sbin/tcpdump/print-icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-icmp6.c,v 1.8 2010/04/06 16:01:57 jsg Exp $ */
+/* $OpenBSD: print-icmp6.c,v 1.9 2011/09/17 15:59:44 naddy Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994
@@ -422,14 +422,14 @@ icmp6_print(const u_char *bp, u_int length, const u_char *bp2)
if (vflag) {
printf(",%s", mode == FQDN ? "FQDN" : "WRU");
if (mode == FQDN) {
- long ttl;
- ttl = (long)ntohl(*(u_long *)&buf[8]);
+ int ttl;
+ ttl = (int)ntohl(*(u_int32_t *)&buf[8]);
if (dp->icmp6_code == 1)
printf(",TTL=unknown");
else if (ttl < 0)
- printf(",TTL=%ld:invalid", ttl);
+ printf(",TTL=%d:invalid", ttl);
else
- printf(",TTL=%ld", ttl);
+ printf(",TTL=%d", ttl);
if (buf[12] != ep - buf - 13) {
(void)printf(",invalid namelen:%d/%u",
buf[12],