mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-26 04:03:32 +00:00
commit
6d8fa7643d
@ -1547,27 +1547,20 @@ int pim_if_connected_to_source(struct interface *ifp, struct in_addr src)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_if_is_loopback(struct pim_instance *pim, struct interface *ifp)
|
bool pim_if_is_loopback(struct interface *ifp)
|
||||||
{
|
{
|
||||||
if (if_is_loopback(ifp))
|
if (if_is_loopback(ifp) || if_is_vrf(ifp))
|
||||||
return 1;
|
return true;
|
||||||
|
|
||||||
if (strcmp(ifp->name, pim->vrf->name) == 0)
|
return false;
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_if_is_vrf_device(struct interface *ifp)
|
bool pim_if_is_vrf_device(struct interface *ifp)
|
||||||
{
|
{
|
||||||
struct vrf *vrf;
|
if (if_is_vrf(ifp))
|
||||||
|
return true;
|
||||||
|
|
||||||
RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
|
return false;
|
||||||
if (strncmp(ifp->name, vrf->name, strlen(ifp->name)) == 0)
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int pim_if_ifchannel_count(struct pim_interface *pim_ifp)
|
int pim_if_ifchannel_count(struct pim_interface *pim_ifp)
|
||||||
|
@ -207,9 +207,9 @@ void pim_if_create_pimreg(struct pim_instance *pim);
|
|||||||
int pim_if_connected_to_source(struct interface *ifp, struct in_addr src);
|
int pim_if_connected_to_source(struct interface *ifp, struct in_addr src);
|
||||||
int pim_update_source_set(struct interface *ifp, struct in_addr source);
|
int pim_update_source_set(struct interface *ifp, struct in_addr source);
|
||||||
|
|
||||||
int pim_if_is_loopback(struct pim_instance *pim, struct interface *ifp);
|
bool pim_if_is_loopback(struct interface *ifp);
|
||||||
|
|
||||||
int pim_if_is_vrf_device(struct interface *ifp);
|
bool pim_if_is_vrf_device(struct interface *ifp);
|
||||||
|
|
||||||
int pim_if_ifchannel_count(struct pim_interface *pim_ifp);
|
int pim_if_ifchannel_count(struct pim_interface *pim_ifp);
|
||||||
#endif /* PIM_IFACE_H */
|
#endif /* PIM_IFACE_H */
|
||||||
|
@ -653,7 +653,7 @@ static int pim_hello_send(struct interface *ifp, uint16_t holdtime)
|
|||||||
{
|
{
|
||||||
struct pim_interface *pim_ifp = ifp->info;
|
struct pim_interface *pim_ifp = ifp->info;
|
||||||
|
|
||||||
if (pim_if_is_loopback(pim_ifp->pim, ifp))
|
if (pim_if_is_loopback(ifp))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (hello_send(ifp, holdtime)) {
|
if (hello_send(ifp, holdtime)) {
|
||||||
@ -755,7 +755,7 @@ void pim_hello_restart_triggered(struct interface *ifp)
|
|||||||
/*
|
/*
|
||||||
* No need to ever start loopback or vrf device hello's
|
* No need to ever start loopback or vrf device hello's
|
||||||
*/
|
*/
|
||||||
if (pim_if_is_loopback(pim_ifp->pim, ifp))
|
if (pim_if_is_loopback(ifp))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user