]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_zebra.c
Per AFI redist registrations
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:45 +0000 (18:03 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 01:03:45 +0000 (18:03 -0700)
commit8bb0831e232336a9d966920901216fa2098ea48a
treef3e045ec5e536cd845760399d96a70705c4818f8
parenta82478b985085105741eed222d8fab7ecc49f25d
Per AFI redist registrations

The problem is that zclient->redist[ZEBRA_ROUTE_MAX] used for storing a
client’s redist state, has no address-family qualification. This means
a client can only store its interest in a protocol (connected, static etc.),
but cant choose IPv4 or ipv6 with that. This hindered implementation on
client sides to manage redistribution of ipv4 and ipv6 both.

BGP's redistribution of protocols like connected/static is one such place.

One fix could be to overload this and flap the redist connection each time
any new afi is added for redist, but that may have side-effects on the
existing afi redist.

The cleaner way is to modify redist data-structure to also take AFI, and adjust
routines that deal with it, so that a client can register for a protocol
redistribution based on the AFI. BGP already maintains redistribution state
based on afi and protocol (bgp->redist[AFI_MAX][ZEBRA_ROUTE_MAX]). This patch
takes care of filling up the gap in zclient/zserv redistribution state to
also use AFI qualification.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
16 files changed:
babeld/babel_zebra.c
babeld/babeld.c
bgpd/bgp_vty.c
bgpd/bgp_zebra.c
bgpd/bgp_zebra.h
isisd/isis_zebra.c
lib/zclient.c
lib/zclient.h
ospf6d/ospf6_zebra.c
ospf6d/ospf6_zebra.h
ospfd/ospf_flood.c
ospfd/ospf_zebra.c
ripd/rip_zebra.c
ripngd/ripng_zebra.c
zebra/redistribute.c
zebra/zserv.h