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-bgp.c | |
parent | 7ffa8e1885137bf28c6c378169c6dc323b6dbbe2 (diff) |
INET6
DHCP/BOOTP
tcp & udp checksum detection
numerous bugfixes
Diffstat (limited to 'usr.sbin/tcpdump/print-bgp.c')
-rw-r--r-- | usr.sbin/tcpdump/print-bgp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-bgp.c b/usr.sbin/tcpdump/print-bgp.c index 7be61b285b8..8baaec38995 100644 --- a/usr.sbin/tcpdump/print-bgp.c +++ b/usr.sbin/tcpdump/print-bgp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-bgp.c,v 1.1 2000/01/16 11:43:57 jakob Exp $ */ +/* $OpenBSD: print-bgp.c,v 1.2 2000/04/26 21:35:39 jakob Exp $ */ /* * Copyright (C) 1999 WIDE Project. @@ -380,7 +380,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len) printf(" invalid len"); break; } - for (i = 0; i < len; i++) { + for (i = 0; i < len; i += 4) { u_int32_t comm; comm = (u_int32_t)ntohl(*(u_int32_t *)&p[i]); switch (comm) { @@ -395,7 +395,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len) break; default: printf(" (AS #%d value 0x%04x)", - (comm >> 16) & 0xffff, comm & 0xfffff); + (comm >> 16) & 0xffff, comm & 0xffff); break; } } |