diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-02 21:52:14 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-05 15:13:30 +0100 |
commit | ee568318946ae5c567e483a9866a43c61fe737ad (patch) | |
tree | 394f687539a710c1d0a1a90d9316e1bd92b78f34 /pimd/pim_zebra.c | |
parent | lib: Send interface request after initial hello (diff) | |
download | frr-ee568318946ae5c567e483a9866a43c61fe737ad.tar.xz frr-ee568318946ae5c567e483a9866a43c61fe737ad.zip |
pimd: Pim is not respecting the move of an interface from old->new vrf
PIM needed to be updated to move to the new vrf.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | pimd/pim_zebra.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index b7111cf7b..11ca6e8a1 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -267,6 +267,27 @@ static int pim_zebra_if_state_down(int command, struct zclient *zclient, return 0; } +static int pim_zebra_interface_vrf_update(int command, struct zclient *zclient, + zebra_size_t length, vrf_id_t vrf_id) +{ + struct interface *ifp; + vrf_id_t new_vrf_id; + + ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, + &new_vrf_id); + if (!ifp) + return 0; + + if (PIM_DEBUG_ZEBRA) + zlog_debug("%s: %s updating from %u to %u", + __PRETTY_FUNCTION__, + ifp->name, vrf_id, new_vrf_id); + + if_update_to_new_vrf(ifp, new_vrf_id); + + return 0; +} + #ifdef PIM_DEBUG_IFADDR_DUMP static void dump_if_address(struct interface *ifp) { @@ -762,6 +783,7 @@ void pim_zebra_init(void) zclient->interface_down = pim_zebra_if_state_down; zclient->interface_address_add = pim_zebra_if_address_add; zclient->interface_address_delete = pim_zebra_if_address_del; + zclient->interface_vrf_update = pim_zebra_interface_vrf_update; zclient->nexthop_update = pim_parse_nexthop_update; zclient_init(zclient, ZEBRA_ROUTE_PIM, 0, &pimd_privs); |