From 840fead817e5f0050c58f24fa8f260f654f0b788 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Sat, 13 May 2017 17:42:56 +0000 Subject: Do not check for locally bound mapped addresses in in6_pcbconnect(), this is done during bind(2) in in6_pcbaddrisavail(). OK mpi@ --- sys/netinet6/in6_pcb.c | 9 ++------- 1 file 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; -- cgit v1.2.3