--- quagga-0.99.7-orig/bgpd/bgp_dump.c 2007-07-22 16:13:53.000000000 +0200 +++ quagga-0.99.7/bgpd/bgp_dump.c 2007-07-22 16:33:45.762097562 +0200 @@ -367,7 +367,7 @@ /* Dump attribute. */ /* Skip prefix & AFI/SAFI for MP_NLRI */ - bgp_dump_routes_attr (obuf, info->attr, &rn->p, 1); + bgp_dump_routes_attr (obuf, info->attr, &rn->p, 1, info->flags); } /* Overwrite the entry count, now that we know the right number */ --- quagga-0.99.7-orig/bgpd/bgp_attr.c 2007-07-22 16:13:53.000000000 +0200 +++ quagga-0.99.7/bgpd/bgp_attr.c 2007-07-22 16:42:55.293413567 +0200 @@ -2182,7 +2182,8 @@ /* Make attribute packet. */ void bgp_dump_routes_attr (struct stream *s, struct attr *attr, - struct prefix *prefix, int dump_small_mp_nlri) + struct prefix *prefix, int dump_small_mp_nlri, + uint16_t flags) { unsigned long cp; unsigned long len; @@ -2324,6 +2325,14 @@ } #endif /* HAVE_IPV6 */ + /* Quagga extended dump attribute. */ + stream_putc (s, BGP_ATTR_FLAG_OPTIONAL); + stream_putc (s, BGP_ATTR_QUAGGA_DUMPEXT); + stream_putc (s, 3); + /* put a version byte to allow clean extensions */ + stream_putc (s, 0); + stream_putw (s, flags); + /* Return total size of attribute. */ len = stream_get_endp (s) - cp - 2; stream_putw_at (s, cp, len); --- quagga-0.99.7-orig/bgpd/bgp_attr.h 2007-07-22 16:13:53.000000000 +0200 +++ quagga-0.99.7/bgpd/bgp_attr.h 2007-07-22 16:29:21.290091707 +0200 @@ -131,7 +131,8 @@ struct prefix *p, afi_t, safi_t, struct prefix_rd *, u_char *); extern void bgp_dump_routes_attr (struct stream *, struct attr *, - struct prefix *, int dump_small_mp_nlri); + struct prefix *, int dump_small_mp_nlri, + uint16_t flags); extern int attrhash_cmp (void *, void *); extern unsigned int attrhash_key_make (void *); extern void attr_show_all (struct vty *); --- quagga-0.99.7-orig/bgpd/bgpd.h 2007-07-22 16:13:53.000000000 +0200 +++ quagga-0.99.7/bgpd/bgpd.h 2007-07-22 16:41:58.790193632 +0200 @@ -604,6 +604,9 @@ #define BGP_ATTR_AS4_PATH 17 #define BGP_ATTR_AS4_AGGREGATOR 18 +/* BGP attribute 255, "development". Used in dumps for extended information. */ +#define BGP_ATTR_QUAGGA_DUMPEXT 255 + /* BGP update origin. */ #define BGP_ORIGIN_IGP 0 #define BGP_ORIGIN_EGP 1