Skip to content

Commit

Permalink
Merge pull request #6027 from sarav511/vrfloop
Browse files Browse the repository at this point in the history
pimd: crash while finding primary address.
  • Loading branch information
donaldsharp authored Apr 10, 2020
2 parents 293d5cb + 2430f05 commit eb728e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pimd/pim_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,15 +900,16 @@ struct in_addr pim_find_primary_addr(struct interface *ifp)
* So let's grab the loopbacks v4 address
* and use that as the primary address
*/
if (!v4_addrs && v6_addrs && !if_is_loopback(ifp)) {
if (!v4_addrs && v6_addrs) {
struct interface *lo_ifp;

// DBS - Come back and check here
if (ifp->vrf_id == VRF_DEFAULT)
lo_ifp = if_lookup_by_name("lo", vrf->vrf_id);
else
lo_ifp = if_lookup_by_name(vrf->name, vrf->vrf_id);

if (lo_ifp)
if (lo_ifp && (lo_ifp != ifp))
return pim_find_primary_addr(lo_ifp);
}

Expand Down

0 comments on commit eb728e0

Please sign in to comment.