diff options
| author | Mark Stapp <mjs@labn.net> | 2023-04-26 15:55:32 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@labn.net> | 2023-06-12 16:41:27 -0400 |
| commit | a32d40a67638c1a7b0d66aede849d510f02d48b4 (patch) | |
| tree | 98b318a553cb6765829213d1360feb74e72a8758 | |
| parent | 3895ea777b05c05d8b20d7eb8e3b3033c02c991e (diff) | |
zebra: clarify interface-level mpls config
We have both interface-level configuration to enable mpls,
and runtime mpls status. They need to be distinct.
Signed-off-by: Mark Stapp <mjs@labn.net>
| -rw-r--r-- | zebra/interface.c | 8 | ||||
| -rw-r--r-- | zebra/interface.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index ccf1a0a204..509a0ffd2c 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; @@ -3016,10 +3017,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; @@ -4859,7 +4860,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"); } diff --git a/zebra/interface.h b/zebra/interface.h index e5545d6ba0..44dcafbad0 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -114,6 +114,9 @@ struct zebra_if { /* MPLS status. */ bool mpls; + /* MPLS configuration */ + uint8_t mpls_config; + /* Linkdown status */ bool linkdown, linkdownv6; |
