]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Pim is not respecting the move of an interface from old->new vrf
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 2 Feb 2019 20:52:14 +0000 (15:52 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 5 Feb 2019 14:13:30 +0000 (09:13 -0500)
PIM needed to be updated to move to the new vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_zebra.c

index b7111cf7bf2d21a024d3fd89eabf05a697cb694a..11ca6e8a108010bba7a44ff19fca425c5b6af770 100644 (file)
@@ -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);