summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-05-13 17:42:55 +0000
committerbluhm <bluhm@openbsd.org>2017-05-13 17:42:55 +0000
commit6b081901620730d9d6422e6ade919d70725ae4c3 (patch)
treee20639dc35dba7d59e6f45aa88971e20911dc087 /sys
parentDo not check for mapped addresses in tcp_usrreq(PRU_CONNECT), (diff)
downloadwireguard-openbsd-6b081901620730d9d6422e6ade919d70725ae4c3.tar.xz
wireguard-openbsd-6b081901620730d9d6422e6ade919d70725ae4c3.zip
Do not check for locally bound mapped addresses in in6_pcbconnect(),
this is done during bind(2) in in6_pcbaddrisavail(). OK mpi@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/in6_pcb.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index 603ec2803ca..59f1bb0d562 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.97 2017/03/07 16:59:40 bluhm Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.98 2017/05/13 17:42:55 bluhm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -256,14 +256,9 @@ in6_pcbconnect(struct inpcb *inp, struct mbuf *nam)
return (EAFNOSUPPORT);
if (sin6->sin6_port == 0)
return (EADDRNOTAVAIL);
-
/* reject IPv4 mapped address, we have no support for it */
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
- return EADDRNOTAVAIL;
-
- /* sanity check for mapped address case */
- if (IN6_IS_ADDR_V4MAPPED(&inp->inp_laddr6))
- return EINVAL;
+ return (EADDRNOTAVAIL);
/* protect *sin6 from overwrites */
tmp = *sin6;