Hi,
Make the SO_BINDANY socket option also work for raw IPv6 sockets.
ok?
bluhm
Index: netinet6/raw_ip6.c
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/raw_ip6.c,v
retrieving revision 1.50
diff -u -p -r1.50 raw_ip6.c
--- netinet6/raw_ip6.c 30 Mar 2013 12:15:29 -0000 1.50
+++ netinet6/raw_ip6.c 30 Mar 2013 23:19:46 -0000
@@ -703,6 +703,7 @@ rip6_usrreq(struct socket *so, int req,
* this in a more natural way.
*/
if (!IN6_IS_ADDR_UNSPECIFIED(&addr->sin6_addr) &&
+ !(so->so_options & SO_BINDANY) &&
(ia = ifa_ifwithaddr((struct sockaddr *)addr,
in6p->inp_rtableid)) == 0) {
error = EADDRNOTAVAIL;