aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-04-25 13:41:41 +0100
committerLexi Winter <ivy@FreeBSD.org>2025-05-20 23:09:29 +0100
commit9d854785e668c225a62cfcde38f7b179b119f961 (patch)
treea84a2c7f58572e2f5360d7621e840fa58e3f6787
parent5b29ffe61469e601c5e53f65d2a115b0c43e3f13 (diff)
netinet6: allow binding a raw socket to any anycast addresslf/dev/anycast-src
Raw sockets have a separate check for this in rip6_bind() that was missed in the previous change. This fixes e.g. 'ping -S' using an anycast address. Fixes: ca4b046105f6 ("netinet6: allow binding to anycast addresses")
-rw-r--r--sys/netinet6/raw_ip6.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 1bb0c0e835cf..af3011bc2e70 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -766,8 +766,7 @@ rip6_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
}
if (ifa != NULL &&
((struct in6_ifaddr *)ifa)->ia6_flags &
- (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|
- IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) {
+ (IN6_IFF_NOTREADY|IN6_IFF_DETACHED|IN6_IFF_DEPRECATED)) {
NET_EPOCH_EXIT(et);
return (EADDRNOTAVAIL);
}