summaryrefslogtreecommitdiff
path: root/pimd/pim_register.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-06-23 16:35:44 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2021-11-17 11:17:44 +0100
commit1e9044be8d4325fa82f01d72eb6c8581dcd6fd06 (patch)
tree587f2a6a425b6328de693f0e39bd79c0e4e82d47 /pimd/pim_register.c
parent7022e70d744105999ebd087701650c01d4faa3e0 (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_register.c')
-rw-r--r--pimd/pim_register.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_register.c b/pimd/pim_register.c
index e2538da36f..cc0dace7c2 100644
--- a/pimd/pim_register.c
+++ b/pimd/pim_register.c
@@ -327,7 +327,7 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
#define PIM_MSG_REGISTER_BIT_RESERVED_LEN 4
ip_hdr = (struct ip *)(tlv_buf + PIM_MSG_REGISTER_BIT_RESERVED_LEN);
- if (!pim_rp_check_is_my_ip_address(pim, dest_addr)) {
+ if (!if_address_is_local(&dest_addr, AF_INET, pim->vrf->vrf_id)) {
if (PIM_DEBUG_PIM_REG) {
char dest[INET_ADDRSTRLEN];