From owner-freebsd-bugs Tue Sep 10 6:20:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5798A37B400 for ; Tue, 10 Sep 2002 06:20:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0CEA743E42 for ; Tue, 10 Sep 2002 06:20:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g8ADK5JU056093 for ; Tue, 10 Sep 2002 06:20:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g8ADK5sK056091; Tue, 10 Sep 2002 06:20:05 -0700 (PDT) Date: Tue, 10 Sep 2002 06:20:05 -0700 (PDT) Message-Id: <200209101320.g8ADK5sK056091@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Jean-Luc Richier Subject: Re: kern/40558: UDP6 sockets do not receive responses of sendto to IPv4mapped address Reply-To: Jean-Luc Richier Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/40558; it has been noted by GNATS. From: Jean-Luc Richier To: freebsd-gnats-submit@FreeBSD.org, Jean-Luc.Richier@imag.fr Cc: Subject: Re: kern/40558: UDP6 sockets do not receive responses of sendto to IPv4mapped address Date: Tue, 10 Sep 2002 15:09:59 +0200 This is a multi-part message in MIME format. --------------060100020504080002060702 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit For FreeBSD 4.6/FreeBSD4.6.2 KAME has suggested the attached patch, used in kame snap distributions and in FreeBSD-5.0. (diff done of 4.6.2 GENERIC) This bug has been corrected in FreeBSD current (checked end of August 2002) using KAME patch. -- Jean-Luc RICHIER (Jean-Luc.Richier@Imag.Fr richier@imag.fr) Laboratoire Logiciels, Systemes et Reseaux (LSR-IMAG) IMAG-CAMPUS, BP 72, F-38402 St Martin d'Heres Cedex Tel : +33 4 76 82 72 32 Fax : +33 4 76 82 72 87 --------------060100020504080002060702 Content-Type: text/plain; name="Patch-udp" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Patch-udp" --- sys/netinet6/ip6_output.c.DIST Sun Apr 28 07:40:27 2002 +++ sys/netinet6/ip6_output.c Mon Sep 2 18:41:47 2002 @@ -1369,6 +1369,10 @@ */ OPTSET(IN6P_BINDV6ONLY); OPTSET(IN6P_IPV6_V6ONLY); + if (optval) + in6p->in6p_vflag &= ~INP_IPV4; + else + in6p->in6p_vflag |= INP_IPV4; break; } break; --- sys/netinet6/udp6_usrreq.c.DIST Sun Apr 28 07:40:27 2002 +++ sys/netinet6/udp6_usrreq.c Mon Sep 2 18:45:44 2002 @@ -534,6 +534,8 @@ return error; inp = (struct inpcb *)so->so_pcb; inp->inp_vflag |= INP_IPV6; + if (ip6_mapped_addr_on) + inp->inp_vflag |= INP_IPV4; inp->in6p_hops = -1; /* use kernel default */ inp->in6p_cksum = -1; /* just to be sure */ /* --------------060100020504080002060702-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message