summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-03-31 13:50:20 +0200
committerGitHub <noreply@github.com>2023-03-31 13:50:20 +0200
commit4979c877b3e0a73bba996ac12a76ee7bc4910e54 (patch)
treeac0d78377194f352837bfb134946e4651f1166ce /pimd
parentMerge pull request #13161 from Orange-OpenSource/isis_te (diff)
parentpim6d: Do not use interfaces with ifindex as 0 (diff)
downloadfrr-4979c877b3e0a73bba996ac12a76ee7bc4910e54.tar.xz
frr-4979c877b3e0a73bba996ac12a76ee7bc4910e54.zip
Merge pull request #13017 from SaiGomathiN/12744
pim6d: Do not use interfaces with ifindex as 0
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_iface.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index d284912d1..ead02d8bd 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -982,6 +982,12 @@ int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term)
zlog_warn("%s: ifindex=%d < 1 on interface %s", __func__,
ifp->ifindex, ifp->name);
return -2;
+ } else if ((ifp->ifindex == 0) &&
+ ((strncmp(ifp->name, "pimreg", 6)) &&
+ (strncmp(ifp->name, "pim6reg", 7)))) {
+ zlog_warn("%s: ifindex=%d == 0 on interface %s", __func__,
+ ifp->ifindex, ifp->name);
+ return -2;
}
ifaddr = pim_ifp->primary_address;