summaryrefslogtreecommitdiffstats
path: root/ripd
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 /ripd
parentMerge pull request #10071 from donaldsharp/valgrind_supp_change (diff)
downloadfrr-1e9044be8d4325fa82f01d72eb6c8581dcd6fd06.tar.xz
frr-1e9044be8d4325fa82f01d72eb6c8581dcd6fd06.zip
*: 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 'ripd')
-rw-r--r--ripd/rip_snmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripd/rip_snmp.c b/ripd/rip_snmp.c
index 824cbd8cf..436dc4de0 100644
--- a/ripd/rip_snmp.c
+++ b/ripd/rip_snmp.c
@@ -257,7 +257,7 @@ static struct interface *rip2IfLookup(struct variable *v, oid name[],
oid2in_addr(name + v->namelen, sizeof(struct in_addr), addr);
- return if_lookup_exact_address((void *)addr, AF_INET,
+ return if_lookup_address_local((void *)addr, AF_INET,
VRF_DEFAULT);
} else {
len = *length - v->namelen;