diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2021-06-23 16:35:44 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2021-11-17 11:17:44 +0100 |
| commit | 1e9044be8d4325fa82f01d72eb6c8581dcd6fd06 (patch) | |
| tree | 587f2a6a425b6328de693f0e39bd79c0e4e82d47 /pimd/pim_igmp.c | |
| parent | 7022e70d744105999ebd087701650c01d4faa3e0 (diff) | |
*: clean up ifp-by-local-address function(s)
Most users of if_lookup_address_exact only cared about whether the
address is any local address. Split that off into a separate function.
For the users that actually need the ifp - which I'm about to add a few
of - change it to prefer returning interfaces that are UP.
(Function name changed due to slight change in behavior re. UP state, to
avoid possible bugs from this change.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_igmp.c')
| -rw-r--r-- | pimd/pim_igmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 795c96c838..cd905b3cbd 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -324,7 +324,7 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version, return 0; } - if (if_lookup_exact_address(&from, AF_INET, ifp->vrf_id)) { + if (if_address_is_local(&from, AF_INET, ifp->vrf_id)) { if (PIM_DEBUG_IGMP_PACKETS) zlog_debug("Recv IGMP query on interface: %s from ourself %s", ifp->name, from_str); |
