summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-05-13 17:42:56 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-05-13 17:42:56 +0000
commit840fead817e5f0050c58f24fa8f260f654f0b788 (patch)
treec741e8f0f9cdec2f2da3575ffd80dc8c75ca118b
parent1fa03ee7d2ab081b85e553dd03b1e52c1a5b710b (diff)
Do not check for locally bound mapped addresses in in6_pcbconnect(),
this is done during bind(2) in in6_pcbaddrisavail(). OK mpi@
-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;