From owner-freebsd-net@freebsd.org Sun Dec 11 12:50:07 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80F40C70858 for ; Sun, 11 Dec 2016 12:50:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43BC91ABB; Sun, 11 Dec 2016 12:50:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1cG3Zt-0004qx-3e; Sun, 11 Dec 2016 15:50:05 +0300 Date: Sun, 11 Dec 2016 15:50:05 +0300 From: Slawa Olhovchenkov To: "Andrey V. Elsukov" Cc: freebsd-net@FreeBSD.org, Eugene Grosbein Subject: Re: [RFC/RFT] projects/ipsec Message-ID: <20161211125004.GF31311@zxy.spb.ru> References: <2bd32791-944f-2417-41e9-e0fe1c705502@FreeBSD.org> <584D18D1.8090400@grosbein.net> <36fa749c-f284-1d96-704c-b7118a574dd0@FreeBSD.org> <20161211115802.GD31311@zxy.spb.ru> <4f8ad6e3-8028-8656-d286-caa391960632@FreeBSD.org> <20161211121515.GE31311@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 12:50:07 -0000 On Sun, Dec 11, 2016 at 03:19:24PM +0300, Andrey V. Elsukov wrote: > On 11.12.2016 15:15, Slawa Olhovchenkov wrote: > >> IPsec is a set of protocol handlers - ESP/AH/IPcomp. Inbound packets are > >> handled by security association with given destination address and SPI. > >> If returned packets aren't destined to your address, protocol handlers > >> will not handle them. > > > > SA can't contains not may address? Surpised to me. > > Or I missunderstund you. > > You can specify what you want, but this just will not work as you > expect. A router usually must not handle all TCP sessions that it You mean forward to IPSec system only packets with DST_IP = my_ip? I that case, why you talk only about not handled returned packets? Originated packets also don't address to me. > forwards. It routes IP packets, but it doesn't invoke tcp_input() for > each TCP packet that it sees. IPSec designed as router ignorance in all network devices I know.