summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorVincent Gross <vgross@cvs.openbsd.org>2016-05-19 08:02:23 +0000
committerVincent Gross <vgross@cvs.openbsd.org>2016-05-19 08:02:23 +0000
commit7eb1f87dce68cc21f9e03241b6b8455f02abdae5 (patch)
treed8b2fc676ded82f195798ce978c9836846adfb9c /sys/netinet6
parentb8b235d7fc1c1489ec948fe8eaa2110551c3fa73 (diff)
Do not check if source address is available when the UDP6 socket is bound
to [::]. We should be able to send from a socket bound to [::] while using sockets bound to specified addresses for reception. Spotted with regress/usr.sbin/syslogd/args-client-bind-only6.pl test case. "makes sense to me" millert@, ok benno@, ok bluhm@
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/udp6_output.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 41d03799001..c7cb27656fa 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.47 2016/03/31 11:59:28 vgross Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.48 2016/05/19 08:02:22 vgross Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -168,7 +168,8 @@ udp6_output(struct inpcb *in6p, struct mbuf *m, struct mbuf *addr6,
goto release;
}
- if (!IN6_ARE_ADDR_EQUAL(&in6p->inp_laddr6, laddr)) {
+ if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->inp_laddr6) &&
+ !IN6_ARE_ADDR_EQUAL(&in6p->inp_laddr6, laddr)) {
valid.sin6_addr = *laddr;
valid.sin6_port = in6p->inp_lport;
valid.sin6_scope_id = 0;