diff options
Diffstat (limited to 'zebra/interface.c')
-rw-r--r-- | zebra/interface.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 2585d0dc3..ba6a37653 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -135,6 +135,7 @@ static int if_zebra_new_hook(struct interface *ifp) zebra_if->ifp = ifp; zebra_if->multicast = IF_ZEBRA_DATA_UNSPEC; + zebra_if->mpls_config = IF_ZEBRA_DATA_UNSPEC; zebra_if->shutdown = IF_ZEBRA_DATA_OFF; zebra_if->link_nsid = NS_UNKNOWN; @@ -267,6 +268,9 @@ struct interface *if_link_per_ns(struct zebra_ns *ns, struct interface *ifp) /* Delete a VRF. This is called in vrf_terminate(). */ void if_unlink_per_ns(struct interface *ifp) { + if (!ifp->node) + return; + ifp->node->info = NULL; route_unlock_node(ifp->node); ifp->node = NULL; @@ -3010,10 +3014,10 @@ DEFPY (mpls, if (no) { dplane_intf_mpls_modify_state(ifp, false); - if_data->mpls = IF_ZEBRA_DATA_UNSPEC; + if_data->mpls_config = IF_ZEBRA_DATA_UNSPEC; } else { dplane_intf_mpls_modify_state(ifp, true); - if_data->mpls = IF_ZEBRA_DATA_ON; + if_data->mpls_config = IF_ZEBRA_DATA_ON; } return CMD_SUCCESS; @@ -4853,7 +4857,8 @@ static int if_config_write(struct vty *vty) IF_ZEBRA_DATA_ON ? "" : "no "); - if (if_data->mpls == IF_ZEBRA_DATA_ON) + + if (if_data->mpls_config == IF_ZEBRA_DATA_ON) vty_out(vty, " mpls enable\n"); } |