diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-19 14:58:30 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-19 14:58:30 +0000 |
commit | fa807a50f99bead557768de9606d5a2fafb88292 (patch) | |
tree | 1d172181e38ff3b67b4e2126a5fcf5340c5c4d9b /sys | |
parent | 1cb2deb4ec6238a44b33617aa901c1f369343143 (diff) |
SO_BINDANY for ipv6; ok djm@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 3fbe4b47abf..3e25e487f7d 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_pcb.c,v 1.44 2008/04/18 06:42:20 djm Exp $ */ +/* $OpenBSD: in6_pcb.c,v 1.45 2008/05/19 14:58:29 markus Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -237,8 +237,9 @@ in6_pcbbind(inp, nam) * well. (What about flow?) */ sin6->sin6_flowinfo = 0; - if ((ia = ifa_ifwithaddr((struct sockaddr *)sin6)) - == NULL) + if (!(so->so_options & SO_BINDANY) && + ((ia = ifa_ifwithaddr((struct sockaddr *)sin6)) + == NULL)) return EADDRNOTAVAIL; /* |