diff options
author | dg <dg@FreeBSD.org> | 1994-02-10 11:24:32 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-02-10 11:24:32 +0000 |
commit | 7e652c921c1a2d0234ade6fc76bd48af04e1491b (patch) | |
tree | a95aaf19cfdfdb86b3037032386939040f7c91ee /usr.sbin | |
parent | 65bc995bd6b7c5bd71960df2b2740239ecb85c2f (diff) | |
download | FreeBSD-src-7e652c921c1a2d0234ade6fc76bd48af04e1491b.zip FreeBSD-src-7e652c921c1a2d0234ade6fc76bd48af04e1491b.tar.gz |
When hexdumping a RIP entry, type cast the bytes to unsigned first. Not
doing so caused them to be sign-extended to an int (which really messed
things up).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/tcpdump/tcpdump/print-rip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/tcpdump/print-rip.c b/usr.sbin/tcpdump/tcpdump/print-rip.c index a824ce6..4e06594 100644 --- a/usr.sbin/tcpdump/tcpdump/print-rip.c +++ b/usr.sbin/tcpdump/tcpdump/print-rip.c @@ -21,7 +21,7 @@ #ifndef lint static char rcsid[] = - "@(#) $Header: /a/cvs/386BSD/src/contrib/tcpdump/tcpdump/print-rip.c,v 1.1.1.1 1993/06/12 14:42:07 rgrimes Exp $ (LBL)"; + "@(#) $Header: /a/cvs/386BSD/src/contrib/tcpdump/tcpdump/print-rip.c,v 1.2 1994/02/10 09:17:57 davidg Exp $ (LBL)"; #endif #include <sys/param.h> @@ -75,8 +75,8 @@ rip_entry_print(ni) printf(" [family %d:", ntohs(ni->rip_dst.sa_family)); for (i = 0; i < 14; i += 2) - printf(" %02x%02x", ni->rip_dst.sa_data[i], - ni->rip_dst.sa_data[i+1]); + printf(" %02x%02x", (u_char)ni->rip_dst.sa_data[i], + (u_char)ni->rip_dst.sa_data[i+1]); printf("]"); } else { register struct sockaddr_in *sin = |