Function ifa_ifwithaf() is not used, any reason to keep it?
Ok to kill it?
diff --git sys/net/if.c sys/net/if.c
index e3c4ba4..826e526 100644
--- sys/net/if.c
+++ sys/net/if.c
@@ -934,27 +934,6 @@ ifa_ifwithnet(struct sockaddr *addr, u_int rdomain)
}
/*
- * Find an interface using a specific address family
- */
-struct ifaddr *
-ifa_ifwithaf(int af, u_int rdomain)
-{
- struct ifnet *ifp;
- struct ifaddr *ifa;
-
- rdomain = rtable_l2(rdomain);
- TAILQ_FOREACH(ifp, &ifnet, if_list) {
- if (ifp->if_rdomain != rdomain)
- continue;
- TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
- if (ifa->ifa_addr->sa_family == af)
- return (ifa);
- }
- }
- return (NULL);
-}
-
-/*
* Find an interface address specific to an interface best matching
* a given address.
*/
diff --git sys/net/if.h sys/net/if.h
index 76fea5b..9649462 100644
--- sys/net/if.h
+++ sys/net/if.h
@@ -842,7 +842,6 @@ void if_start(struct ifnet *);
void ifnewlladdr(struct ifnet *);
struct ifaddr *ifa_ifwithaddr(struct sockaddr *, u_int);
-struct ifaddr *ifa_ifwithaf(int, u_int);
struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *, u_int);
struct ifaddr *ifa_ifwithnet(struct sockaddr *, u_int);
struct ifaddr *ifa_ifwithroute(int, struct sockaddr *,
diff --git sys/netinet6/nd6_rtr.c sys/netinet6/nd6_rtr.c
index 9539113..b1e2a18 100644
--- sys/netinet6/nd6_rtr.c
+++ sys/netinet6/nd6_rtr.c
@@ -1598,7 +1598,6 @@ nd6_prefix_onlink(struct nd_prefix *pr)
ifa = &in6ifa_ifpforlinklocal(ifp,
IN6_IFF_NOTREADY | IN6_IFF_ANYCAST)->ia_ifa;
if (ifa == NULL) {
- /* XXX: freebsd does not have ifa_ifwithaf */
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
if (ifa->ifa_addr->sa_family == AF_INET6)
break;