From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 1 09:30:07 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA015106566B for ; Tue, 1 Sep 2009 09:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8BA8FC22 for ; Tue, 1 Sep 2009 09:30:07 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n819U7oI064477 for ; Tue, 1 Sep 2009 09:30:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n819U7FV064476; Tue, 1 Sep 2009 09:30:07 GMT (envelope-from gnats) Resent-Date: Tue, 1 Sep 2009 09:30:07 GMT Resent-Message-Id: <200909010930.n819U7FV064476@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Aurélien Ansel Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F390F1065672 for ; Tue, 1 Sep 2009 09:23:50 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E29368FC0C for ; Tue, 1 Sep 2009 09:23:50 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n819NoHX016448 for ; Tue, 1 Sep 2009 09:23:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n819Noq0016429; Tue, 1 Sep 2009 09:23:50 GMT (envelope-from nobody) Message-Id: <200909010923.n819Noq0016429@www.freebsd.org> Date: Tue, 1 Sep 2009 09:23:50 GMT From: Aurélien Ansel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/138439: [IPSec] Tunnel with IPv4 and IPv6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2009 09:30:07 -0000 >Number: 138439 >Category: kern >Synopsis: [IPSec] Tunnel with IPv4 and IPv6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 01 09:30:06 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Aurélien Ansel >Release: 7.2-STABLE >Organization: NETASQ >Environment: FreeBSD aureliena2.netasq.com 7.2-STABLE FreeBSD 7.2-STABLE #3: Tue Sep 1 10:49:57 CEST 2009 root@aureliena2.netasq.com:/usr/src/sys/i386/compile/NOYAU i386 >Description: The component Setkey of the port 'ipsec-tools' refuse the SP for a tunnel with IPv4 in IPv6. Setkey respond 'Invalid Argument'. That comes from the kernelland, from netipsec/key.c. An extract of my setkey.sh : spdadd 222.222.222.0/24 111.111.111.0/24 any -P out ipsec esp/tunnel/2001::2-2001::1/require; spdadd 111.111.111.0/24 222.222.222.0/24 any -P in ipsec esp/tunnel/2001::1-2001::2/require; /!\ The patch attached is NOT a fix, it's a help to show where the problem comes from !!!!!! >How-To-Repeat: With the component setkey try : spdadd 222.222.222.0/24 111.111.111.0/24 any -P out ipsec esp/tunnel/2001::2-2001::1/require; without the patch attached and after with it. The first time Setkey will respond 'invalid argument', the second time it will be OK. >Fix: Patch attached with submission follows: --- key.c.backup 2009-08-31 18:02:20.000000000 +0200 +++ key.c 2009-09-01 11:10:32.000000000 +0200 @@ -1891,7 +1891,7 @@ _key_delsp(newsp); return key_senderror(so, m, EINVAL); } -#if 1 +#if 0 if (newsp->req && newsp->req->saidx.src.sa.sa_family) { struct sockaddr *sa; sa = (struct sockaddr *)(src0 + 1); >Release-Note: >Audit-Trail: >Unformatted: