]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib,zebra: remove table node from ifp struct
authorMark Stapp <mjs@cisco.com>
Thu, 24 Oct 2024 21:49:28 +0000 (14:49 -0700)
committerMark Stapp <mjs@cisco.com>
Tue, 29 Oct 2024 17:49:43 +0000 (13:49 -0400)
Finish removing the table route_node from the ifp struct.

Signed-off-by: Mark Stapp <mjs@cisco.com>
lib/if.c
lib/if.h
zebra/interface.c

index 8f15230f2334ad8e9d6881a9dec081f901fb64ab..378ca16e4957ffc32cc08a5b00805a16e8c2f3f4 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -1002,12 +1002,6 @@ void if_terminate(struct vrf *vrf)
 
        while (!RB_EMPTY(if_name_head, &vrf->ifaces_by_name)) {
                ifp = RB_ROOT(if_name_head, &vrf->ifaces_by_name);
-
-               if (ifp->node) {
-                       ifp->node->info = NULL;
-                       route_unlock_node(ifp->node);
-                       ifp->node = NULL;
-               }
                if_delete(&ifp);
        }
 }
index 0dc56bd21098a7f12276b36850522d8fd13d08cc..c2ec73378d85cd4f69d0bc8b7a39547d27a11b44 100644 (file)
--- a/lib/if.h
+++ b/lib/if.h
@@ -295,8 +295,6 @@ struct interface {
        struct if_data stats;
 #endif /* HAVE_NET_RT_IFLIST */
 
-       struct route_node *node;
-
        struct vrf *vrf;
 
        /*
index 74e2500532d4f0fd29d8c96e59c1ba872bfaf423..86de5dbae68e30fb44ff1b5f53f7f4eab6f355bf 100644 (file)
@@ -215,6 +215,8 @@ static int if_zebra_delete_hook(struct interface *ifp)
                if_nhg_dependents_release(ifp);
                nhg_connected_tree_free(&zebra_if->nhg_dependents);
 
+               zebra_ns_unlink_ifp(ifp);
+
                XFREE(MTYPE_ZIF_DESC, zebra_if->desc);
 
                EVENT_OFF(zebra_if->speed_update);
@@ -730,7 +732,6 @@ void if_delete_update(struct interface **pifp)
           for setting ifindex to IFINDEX_INTERNAL after processing the
           interface deletion message. */
        if_set_index(ifp, IFINDEX_INTERNAL);
-       ifp->node = NULL;
 
        UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK);