]> git.proxmox.com Git - mirror_frr.git/commit - ripd/ripd.c
ripd, ripngd: change how we keep track of redistribution configuration
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 4 Jan 2019 21:08:10 +0000 (19:08 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 18 Jan 2019 18:15:41 +0000 (16:15 -0200)
commitf9120f719ac2433dd9f168eed97e7b71ea38125e
tree63a1bfe594d65af6fdcfa3dbe16a7d3445b8b012
parent64dac4ffb9316ab51754822713c1bab6444491ac
ripd, ripngd: change how we keep track of redistribution configuration

ripd and ripngd were leveraging the zclient code to keep track of
the redistribute configuration, which is what most daemons do. The
problem, however, is that the zclient code uses VRF IDs to identify
VRFs, and VRF IDs are unknown until a VRF is enabled (information
received from zebra). This means we can't configure a redistribute
command on a RIP instance when the corresponding VRF is disabled
(doing so leads to a null-dereference crash right now in both ripd
and ripngd).

To fix this, change the rip/ripng data structures so that they
keep track of the full redistribute configuration and not only the
route-map and metric associated to each command. This is similar
to what bgpd and ospfd are doing to solve the same problem. In the
future the zclient code and all daemons need to be refactored to
consolidate the handling of redistribute configuration in a single
place to reduce code duplication. One of the most important changes
to do is to use VRF names and not VRF IDs to identify VRFs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_northbound.c
ripd/rip_zebra.c
ripd/ripd.c
ripd/ripd.h
ripngd/ripng_northbound.c
ripngd/ripng_zebra.c
ripngd/ripngd.c
ripngd/ripngd.h