diff options
author | paul <paul> | 2003-10-18 01:30:50 +0000 |
---|---|---|
committer | paul <paul> | 2003-10-18 01:30:50 +0000 |
commit | a384592fda7cec702f8d3201f51b636d6fe1be9b (patch) | |
tree | 20b24811f3f89351fc92b41fa0293c7d77963088 /bgpd/bgp_dump.c | |
parent | 9834cd0f43bc45f04303b0f742faacf3bc5eac45 (diff) |
2003-10-18 Lorenzo Colitti <lorenzo@ripe.net>
2003-10-18 Lorenzo Colitti <lorenzo@ripe.net>
* bgpd/bgp_attr.c: (bgp_dump_routes_attr) Dont dump IPv4 nexthop
for IP. Dump MP_NLRI attr with IPv6 next-hop for AF_INET6 address
family prefixes. Accept prefix as argument.
* bgpd/bgp_attr.c: modify bgp_dump_routes_attr declaration.
* bgpd/bgp_dump.c: (bgp_dump_routes_entry) Modify calls to
bgp_dump_routes_attr.
(bgp_dump_common) Go by the family of the peering socket, not
configured address family when dumping peering information.
Add HAVE_IPV6 conditionals, eg missing from previous bgp interval
patch.
Diffstat (limited to 'bgpd/bgp_dump.c')
-rw-r--r-- | bgpd/bgp_dump.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 516e9b25..e3c62814 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -236,7 +236,7 @@ bgp_dump_routes_entry (struct prefix *p, struct bgp_info *info, int afi, stream_putw (obuf, peer->as); /* Dump attribute. */ - bgp_dump_routes_attr (obuf, attr); + bgp_dump_routes_attr (obuf, attr, NULL); } else { @@ -246,7 +246,7 @@ bgp_dump_routes_entry (struct prefix *p, struct bgp_info *info, int afi, stream_putc (obuf, p->prefixlen); plen = PSIZE (p->prefixlen); stream_put (obuf, &p->u.prefix4, plen); - bgp_dump_routes_attr (obuf, attr); + bgp_dump_routes_attr (obuf, attr, NULL); } } #ifdef HAVE_IPV6 @@ -272,7 +272,7 @@ bgp_dump_routes_entry (struct prefix *p, struct bgp_info *info, int afi, stream_putw (obuf, peer->as); /* Dump attribute. */ - bgp_dump_routes_attr (obuf, attr); + bgp_dump_routes_attr (obuf, attr, p); } else { @@ -330,7 +330,9 @@ bgp_dump_interval_func (struct thread *t) if (bgp_dump->type == BGP_DUMP_ROUTES) { bgp_dump_routes_func (AFI_IP); +#ifdef HAVE_IPV6 bgp_dump_routes_func (AFI_IP6); +#endif /* HAVE_IPV6 */ /* Close the file now. For a RIB dump there's no point in leaving * it open until the next scheduled dump starts. */ fclose(bgp_dump->fp); bgp_dump->fp = NULL; @@ -354,7 +356,7 @@ bgp_dump_common (struct stream *obuf, struct peer *peer) stream_putw (obuf, peer->as); stream_putw (obuf, peer->local_as); - if (peer->afc[AFI_IP][SAFI_UNICAST]) + if (peer->su.sa.sa_family == AF_INET) { stream_putw (obuf, peer->ifindex); stream_putw (obuf, AFI_IP); @@ -367,7 +369,7 @@ bgp_dump_common (struct stream *obuf, struct peer *peer) stream_put (obuf, empty, IPV4_MAX_BYTELEN); } #ifdef HAVE_IPV6 - else if (peer->afc[AFI_IP6][SAFI_UNICAST]) + else if (peer->su.sa.sa_family == AF_INET6) { /* Interface Index and Address family. */ stream_putw (obuf, peer->ifindex); |