summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-07-10 17:13:25 -0400
committerGitHub <noreply@github.com>2020-07-10 17:13:25 -0400
commit14d09806da631350cbbd376c38406083fbde7dfd (patch)
treebaba501731aedf5e9bf54c369916f2fee1dc22d1
parent39c381ba37789bb95ad7699662531c14e79aff98 (diff)
parentc479909b69b52144bd415e59480c151b71a84e27 (diff)
Merge pull request #6716 from sworleys/Connected-Match-Ifindex
zebra: mark connected nh inactive if not matching ifindex
-rw-r--r--zebra/zebra_nhg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index f5e4a4e79e..9bfd7aacb7 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1921,6 +1921,13 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
if (nexthop->type == NEXTHOP_TYPE_IPV4
|| nexthop->type == NEXTHOP_TYPE_IPV6)
nexthop->ifindex = newhop->ifindex;
+ else if (nexthop->ifindex != newhop->ifindex) {
+ /*
+ * NEXTHOP_TYPE_*_IFINDEX but ifindex
+ * doesn't match what we found.
+ */
+ return 0;
+ }
}
if (IS_ZEBRA_DEBUG_NHG_DETAIL)