From Hannes Gredler: fix to label stack handling for withdrawn routes.

svn path=/trunk/; revision=5511
This commit is contained in:
Guy Harris 2002-05-20 01:01:11 +00:00
parent 44580a93ca
commit 04b133f82e
2 changed files with 10 additions and 1 deletions

View File

@ -675,6 +675,7 @@ Hannes Gredler <hannes[AT]juniper.net> {
Juniper Networks vendor ID in RADIUS dissector
HELLO message support in RSVP
Labeled unicast support for BGP
Fix to label stack handling for withdrawn routes
}
Inoue <inoue[AT]ainet.or.jp> {

View File

@ -2,16 +2,18 @@
* Routines for BGP packet dissection.
* Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org>
*
* $Id: packet-bgp.c,v 1.56 2002/05/15 21:40:25 guy Exp $
* $Id: packet-bgp.c,v 1.57 2002/05/20 01:01:11 guy Exp $
*
* Supports:
* RFC1771 A Border Gateway Protocol 4 (BGP-4)
* RFC1965 Autonomous System Confederations for BGP
* RFC1997 BGP Communities Attribute
* RFC2547 BGP/MPLS VPNs
* RFC2796 BGP Route Reflection An alternative to full mesh IBGP
* RFC2842 Capabilities Advertisement with BGP-4
* RFC2858 Multiprotocol Extensions for BGP-4
* RFC2918 Route Refresh Capability for BGP-4
* RFC3107 Carrying Label Information in BGP-4
* Draft Ramahandra on Extended Communities Extentions
*
* TODO:
@ -314,6 +316,12 @@ decode_MPLS_stack(tvbuff_t *tvb, gint offset, char *buf, int buflen)
while ((label_entry && 0x000001) == 0) {
label_entry = tvb_get_ntoh24(tvb, index) ;
/* withdrawn routes may contain 0 or 0x800000 in the first label */
if((index-offset)==0&&(label_entry==0||label_entry==0x800000)) {
snprintf(buf, buflen, "0 (withdrawn)");
return (1);
}
snprintf(buf, buflen,"%s%u%s", buf, (label_entry >> 4), ((label_entry && 0x000001) == 0) ? "," : " (bottom)");
index += 3 ;
}