From owner-freebsd-net@freebsd.org Tue Jun 12 14:54:51 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 547B9101B749 for ; Tue, 12 Jun 2018 14:54:51 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 038BA682F0 for ; Tue, 12 Jun 2018 14:54:51 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: olivier/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id AE5FA1D41C for ; Tue, 12 Jun 2018 14:54:50 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: by mail-pf0-f172.google.com with SMTP id b74-v6so12261635pfl.5 for ; Tue, 12 Jun 2018 07:54:50 -0700 (PDT) X-Gm-Message-State: APt69E0w0YQMpn9JDqSXgSxTWtKBDAMlcpSlruY35S+um4LW1e3PZ7v8 yYpORO87BVhjLHbBGRWC7dzUw2nMIq5+VAv1VbI= X-Google-Smtp-Source: ADUXVKLgxohwF/9sbqsz4xZs7hO7sWDHrP3Ar4rrO9gaWsuQV4/PAt1HDypdGLxpBJTDY/mIFYfyUfM+HxKgGSB2x0s= X-Received: by 2002:a62:d146:: with SMTP id t6-v6mr734086pfl.127.1528815289754; Tue, 12 Jun 2018 07:54:49 -0700 (PDT) MIME-Version: 1.0 References: <20180612143447.697681c5@mr185083> <20180612160116.58df4001@mr185083> In-Reply-To: <20180612160116.58df4001@mr185083> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Tue, 12 Jun 2018 16:54:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: 11.2-RC1 setkey invalid spi ? To: Patrick Lamaiziere Cc: freebsd-net@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 14:54:51 -0000 On Tue, Jun 12, 2018 at 4:02 PM Patrick Lamaiziere wrote: > Le Tue, 12 Jun 2018 14:34:47 +0200, > Patrick Lamaiziere a =C3=A9crit : > > Hello > =E2=80=8BHi Patrick, =E2=80=8B > > Well I can reproduce this problem by using setkey(8) : > > /etc/ipsec.conf > add 129.20.128.78 129.20.128.149 tcp 0x1000 -A tcp-md5 "secret"; > add 129.20.128.149 129.20.128.78 tcp 0x1000 -A tcp-md5 "secret"; > > > =E2=80=8B You can't no more use the same SPI for these 2 entries (cf the TCP MD5 examples into the setkey man page): Use TCP MD5 between two numerically specified hosts: add 10.1.10.34 10.1.10.36 tcp 0x1000 -A tcp-md5 "TCP-MD5 BGP secret" ; add 10.1.10.36 10.1.10.34 tcp 0x1001 -A tcp-md5 "TCP-MD5 BGP secret" ; =E2=80=8BRegards, Olivier=E2=80=8B