diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-20 01:01:11 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-20 01:01:11 +0000 |
commit | 04b133f82ee5138eef00dbf2ef86e87dead88e84 (patch) | |
tree | d1cb2385783ae39ba24b10a781247e18b1439969 /packet-bgp.c | |
parent | 44580a93ca4c8c323b99200deac2b64c9033d96e (diff) |
From Hannes Gredler: fix to label stack handling for withdrawn routes.
svn path=/trunk/; revision=5511
Diffstat (limited to 'packet-bgp.c')
-rw-r--r-- | packet-bgp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packet-bgp.c b/packet-bgp.c index 27d86f5ff9..a43726236b 100644 --- a/packet-bgp.c +++ b/packet-bgp.c @@ -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 ; } |