diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-06-14 17:42:07 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-06-14 17:42:07 +0000 |
commit | d20ad6759bbb32d01503007c7d2101018d380551 (patch) | |
tree | 017a49c6ccdd5d63ca0b5791c75e053823966219 | |
parent | dc7e452d1c23b9ba73228a0ffb91bbeeee4bffeb (diff) |
Print communities in a nicer format and include a missing well-known one.
This is mostly from Stuart Henderson. OK canacar@
-rw-r--r-- | usr.sbin/tcpdump/print-bgp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-bgp.c b/usr.sbin/tcpdump/print-bgp.c index 30caf159197..99add7edf74 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.8 2007/05/27 12:38:39 canacar Exp $ */ +/* $OpenBSD: print-bgp.c,v 1.9 2007/06/14 17:42:06 claudio Exp $ */ /* * Copyright (C) 1999 WIDE Project. @@ -205,6 +205,7 @@ static const char *bgpattr_nlri_safi[] = { #define BGP_COMMUNITY_NO_EXPORT 0xffffff01 #define BGP_COMMUNITY_NO_ADVERT 0xffffff02 #define BGP_COMMUNITY_NO_EXPORT_SUBCONFED 0xffffff03 +#define BGP_COMMUNITY_NO_PEER 0xffffff04 static const char *afnumber[] = AFNUM_NAME_STR; #define af_name(x) \ @@ -418,8 +419,11 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len) case BGP_COMMUNITY_NO_EXPORT_SUBCONFED: printf(" NO_EXPORT_SUBCONFED"); break; + case BGP_COMMUNITY_NO_PEER: + printf(" NO_PEER"); + break; default: - printf(" (AS #%d value 0x%04x)", + printf(" %d:%d", (comm >> 16) & 0xffff, comm & 0xffff); break; } |