Skip to content

Commit

Permalink
zebra: fix mpls setting at startup
Browse files Browse the repository at this point in the history
When an interface is recovered, and has mpls in auto mode,
the mpls value may be misconfigured.
Fix this by checking if the interface is in automatic mode.
If it is the case, pick up the 'mpls_dynamic' value to
change the real mpls value.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Jul 13, 2023
1 parent 4f8e6c5 commit 13f9954
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,9 @@ void if_add_update(struct interface *ifp)
dplane_intf_mpls_modify_state(ifp, true);
else if (if_data->mpls_config == IF_ZEBRA_DATA_OFF)
dplane_intf_mpls_modify_state(ifp, false);
else if (if_data->mpls_config == IF_ZEBRA_DATA_AUTO)
dplane_intf_mpls_modify_state(ifp,
if_data->mpls_dynamic);

if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
Expand Down

0 comments on commit 13f9954

Please sign in to comment.