diff options
| author | Patrick Ruddy <pat@voltanet.io> | 2020-12-15 17:23:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-15 17:23:32 +0000 |
| commit | 01c65ba77e7a3b58bb0421829d80ec50c3914e62 (patch) | |
| tree | ade93dc65ba9d1b37dd8c4dd5822bc8df7a5f359 /zebra/interface.c | |
| parent | 30ff2a502e41a048d5033b5d1f8ac32dd715eddc (diff) | |
| parent | dc261b8de40a9f89c756c2b7f13d8bf42a2c5024 (diff) | |
Merge pull request #7633 from AnuradhaKaruppiah/protodown-fixes
evpn-mh: protodown handling fixes
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index ddad9c9e56..4072eb1568 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1428,6 +1428,14 @@ const char *zebra_protodown_rc_str(enum protodown_reasons protodown_rc, return pd_buf; } +static inline bool if_is_protodown_applicable(struct interface *ifp) +{ + if (IS_ZEBRA_IF_BOND(ifp)) + return false; + + return true; +} + /* Interface's information print out to vty interface. */ static void if_dump_vty(struct vty *vty, struct interface *ifp) { @@ -1592,14 +1600,13 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp) } zebra_evpn_if_es_print(vty, zebra_if); - vty_out(vty, " protodown: %s", - (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off"); + vty_out(vty, " protodown: %s %s\n", + (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off", + if_is_protodown_applicable(ifp) ? "" : "(n/a)"); if (zebra_if->protodown_rc) - vty_out(vty, " rc: %s\n", + vty_out(vty, " protodown reasons: %s\n", zebra_protodown_rc_str(zebra_if->protodown_rc, pd_buf, sizeof(pd_buf))); - else - vty_out(vty, "\n"); if (zebra_if->link_ifindex != IFINDEX_INTERNAL) { if (zebra_if->link) |
