diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2000-04-26 21:35:45 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2000-04-26 21:35:45 +0000 |
commit | 2dd23c23770ee72b2c221e1b8ddf74531cf67e15 (patch) | |
tree | 6bc2e589e5c398c416d7cd4014d0d050bdcea861 /usr.sbin/tcpdump/print-rip.c | |
parent | 7ffa8e1885137bf28c6c378169c6dc323b6dbbe2 (diff) |
INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes
Diffstat (limited to 'usr.sbin/tcpdump/print-rip.c')
-rw-r--r-- | usr.sbin/tcpdump/print-rip.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-rip.c b/usr.sbin/tcpdump/print-rip.c index 0f14f24eb41..283245f6d02 100644 --- a/usr.sbin/tcpdump/print-rip.c +++ b/usr.sbin/tcpdump/print-rip.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-rip.c,v 1.5 1996/12/12 16:22:28 bitblt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/print-rip.c,v 1.6 2000/04/26 21:35:42 jakob Exp $ (LBL)"; #endif #include <sys/param.h> @@ -100,8 +100,10 @@ rip_print(const u_char *dat, u_int length) register int i, j, trunc; i = min(length, snapend - dat) - sizeof(*rp); - if (i < 0) + if (i < 0) { + printf(" [|rip]"); return; + } rp = (struct rip *)dat; switch (rp->rip_cmd) { @@ -116,7 +118,7 @@ rip_print(const u_char *dat, u_int length) printf(" rip-resp %d[%d]:", j, length); else printf(" rip-resp %d:", j); - trunc = ((i / sizeof(*ni)) * sizeof(*ni) != i); + trunc = (i / sizeof(*ni)) != j; ni = (struct rip_netinfo *)(rp + 1); for (; (i -= sizeof(*ni)) >= 0; ++ni) rip_entry_print(rp->rip_vers, ni); |