Skip to content

Commit

Permalink
lib,zebra: remove table node from ifp struct
Browse files Browse the repository at this point in the history
Finish removing the table route_node from the ifp struct.

Signed-off-by: Mark Stapp <[email protected]>
  • Loading branch information
Mark Stapp committed Oct 29, 2024
1 parent 2b05d34 commit c116053
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions lib/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/if.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,6 @@ struct interface {
struct if_data stats;
#endif /* HAVE_NET_RT_IFLIST */

struct route_node *node;

struct vrf *vrf;

/*
Expand Down
3 changes: 2 additions & 1 deletion zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c116053

Please sign in to comment.