[rtems commit] routing: fix source address selection rules for IPv4 over IPv6.

Sebastian Huber sebh at rtems.org
Mon Jul 11 11:47:03 UTC 2022


Module:    rtems
Branch:    master
Commit:    7846249e1a422cfcaa2b1f589302441d5373b804
Changeset: http://git.rtems.org/rtems/commit/?id=7846249e1a422cfcaa2b1f589302441d5373b804

Author:    Alexander V. Chernikov <melifaro at FreeBSD.org>
Date:      Mon Sep  6 22:08:15 2021 +0000

routing: fix source address selection rules for IPv4 over IPv6.

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-127.0.0.1 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 vc mailing list