diff options
| author | Russ White <russ@riw.us> | 2022-06-24 10:15:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-24 10:15:55 -0400 |
| commit | a9adefc22fe93a5019b42a51759fde2823834d22 (patch) | |
| tree | 7a57acb03cae47c1dd175be7a2c229ee08054e53 /zebra/interface.c | |
| parent | ff97a24bc351ba4d34196ffbf0ee0c25ff5b52a1 (diff) | |
| parent | fc3de981be3d294f459e1e34cfef375c53414c30 (diff) | |
Merge pull request #11464 from donaldsharp/linkdown
Linkdown
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 93ffeb437c..5f36b88a1c 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1407,7 +1407,7 @@ static void zebra_if_netconf_update_ctx(struct zebra_dplane_ctx *ctx, struct interface *ifp) { struct zebra_if *zif; - enum dplane_netconf_status_e mpls; + enum dplane_netconf_status_e mpls, linkdown; zif = ifp->info; if (!zif) { @@ -1424,10 +1424,17 @@ static void zebra_if_netconf_update_ctx(struct zebra_dplane_ctx *ctx, else if (mpls == DPLANE_NETCONF_STATUS_DISABLED) zif->mpls = false; + linkdown = dplane_ctx_get_netconf_linkdown(ctx); + if (linkdown == DPLANE_NETCONF_STATUS_ENABLED) + zif->linkdown = true; + else if (linkdown == DPLANE_NETCONF_STATUS_DISABLED) + zif->linkdown = false; + if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug("%s: if %s, ifindex %d, mpls %s", + zlog_debug("%s: if %s, ifindex %d, mpls %s linkdown %s", __func__, ifp->name, ifp->ifindex, - (zif->mpls ? "ON" : "OFF")); + (zif->mpls ? "ON" : "OFF"), + (zif->linkdown ? "ON" : "OFF")); } void zebra_if_dplane_result(struct zebra_dplane_ctx *ctx) @@ -1890,6 +1897,9 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp) if (zebra_if->mpls) vty_out(vty, " MPLS enabled\n"); + if (zebra_if->linkdown) + vty_out(vty, " Ignore all routes with linkdown\n"); + /* Hardware address. */ vty_out(vty, " Type: %s\n", if_link_type_str(ifp->ll_type)); if (ifp->hw_addr_len != 0) { @@ -2211,6 +2221,7 @@ static void if_dump_vty_json(struct vty *vty, struct interface *ifp, zebra_if->desc); json_object_boolean_add(json_if, "mplsEnabled", zebra_if->mpls); + json_object_boolean_add(json_if, "linkDown", zebra_if->linkdown); if (ifp->ifindex == IFINDEX_INTERNAL) { json_object_boolean_add(json_if, "pseudoInterface", true); |
