]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: handle macvlan down event
authorChirag Shah <chirag@cumulusnetworks.com>
Fri, 11 Oct 2019 18:42:12 +0000 (11:42 -0700)
committerChirag Shah <chirag@cumulusnetworks.com>
Fri, 22 Nov 2019 15:53:38 +0000 (07:53 -0800)
Macvlan down event have sentinel check of its parent
link presence.

Ticket:CM-26622
Reviewed By:CCR-9326
Testing Done:

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
zebra/zebra_vxlan.c

index 1da419040ed6c352cd30daee20595d698487b63b..dbc47223e1940c1616d5d12a8ddbfef9749f1290 100644 (file)
@@ -8582,6 +8582,13 @@ void zebra_vxlan_macvlan_down(struct interface *ifp)
        zif = ifp->info;
        assert(zif);
        link_ifp = zif->link;
+       if (!link_ifp) {
+               if (IS_ZEBRA_DEBUG_VXLAN)
+                       zlog_debug("macvlan %s parent link is not found. Parent index %d ifp %s",
+                               ifp->name, zif->link_ifindex,
+                               if_lookup_by_index_all_vrf(zif->link_ifindex));
+               return;
+       }
        link_zif = link_ifp->info;
        assert(link_zif);