summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-04-07 20:58:26 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-04-07 20:58:26 +0000
commitde4edc71d9a5a04a98a1a581d68881ae68b47b15 (patch)
treed30d4ee10a745abf1d790ac7b5f3b26d25d5e8dd
parent31c0e518d6e5f361e4789dd4f1210444d3e08236 (diff)
Make the SO_BINDANY socket option also work for raw IPv6 sockets.
OK markus@
-rw-r--r--sys/netinet6/raw_ip6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 174d786b041..58cd34aab89 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.52 2013/04/01 22:51:39 bluhm Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.53 2013/04/07 20:58:25 bluhm Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -691,6 +691,7 @@ rip6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
* 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;