pimd: Don't send hello's out vrf interface

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-06-02 18:23:11 -04:00
parent 1ef8c24eb9
commit 11699c4788
3 changed files with 14 additions and 6 deletions

View File

@ -1582,3 +1582,14 @@ int pim_if_connected_to_source(struct interface *ifp, struct in_addr src)
return 0;
}
int pim_if_is_loopback(struct pim_instance *pim, struct interface *ifp)
{
if (if_is_loopback(ifp))
return 1;
if (strcmp(ifp->name, pim->vrf->name) == 0)
return 1;
return 0;
}

View File

@ -205,4 +205,5 @@ void pim_if_create_pimreg(struct pim_instance *pim);
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_if_is_loopback(struct pim_instance *pim, struct interface *ifp);
#endif /* PIM_IFACE_H */

View File

@ -667,13 +667,9 @@ static int hello_send(struct interface *ifp, uint16_t holdtime)
static int pim_hello_send(struct interface *ifp, uint16_t holdtime)
{
struct pim_interface *pim_ifp;
struct pim_interface *pim_ifp = ifp->info;
zassert(ifp);
pim_ifp = ifp->info;
zassert(pim_ifp);
if (if_is_loopback(ifp))
if (pim_if_is_loopback(pim_ifp->pim, ifp))
return 0;
if (hello_send(ifp, holdtime)) {