]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #13017 from SaiGomathiN/12744
authorDonald Sharp <donaldsharp72@gmail.com>
Fri, 31 Mar 2023 11:50:20 +0000 (07:50 -0400)
committerGitHub <noreply@github.com>
Fri, 31 Mar 2023 11:50:20 +0000 (07:50 -0400)
pim6d: Do not use interfaces with ifindex as 0

pimd/pim_iface.c

index d284912d1d26d8d0ec6000a5c00025a636226254..ead02d8bd753cfe14a3b1f49a7b792c874120f20 100644 (file)
@@ -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;