[PATCH 2/4] routing: fix source address selection rules for IPv4 over IPv6.

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 7 12:01:06 UTC 2022

From: "Alexander V. Chernikov" <melifaro at FreeBSD.org>

Current logic always selects an IFA of the same family from the
 outgoing interfaces. In IPv4 over IPv6 setup there can be just
 single non- ifa, attached to the loopback interface.

Create a separate rt_getifa_family() to handle entire ifa selection
 for the IPv4 over IPv6.

Differential Revision: https://reviews.freebsd.org/D31868
MFC after:	1 week
 cpukit/include/machine/_kernel_in.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cpukit/include/machine/_kernel_in.h b/cpukit/include/machine/_kernel_in.h
index 29a6112e96..69b189cfe0 100644
--- a/cpukit/include/machine/_kernel_in.h
+++ b/cpukit/include/machine/_kernel_in.h
@@ -52,6 +52,7 @@ int	 in_canforward(struct in_addr);
 int	 in_localaddr(struct in_addr);
 int	 in_localip(struct in_addr);
 int	 in_ifhasaddr(struct ifnet *, struct in_addr);
+struct in_ifaddr *in_findlocal(uint32_t, bool);
 int	 inet_aton(const char *, struct in_addr *); /* in libkern */
 char	*inet_ntoa_r(struct in_addr ina, char *buf); /* in libkern */
 char	*inet_ntop(int, const void *, char *, socklen_t); /* in libkern */

More information about the devel mailing list