From owner-freebsd-net@freebsd.org Sun Jan 19 03:38:44 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82376229324 for ; Sun, 19 Jan 2020 03:38:44 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (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 480gWS2wK5z3JQG; Sun, 19 Jan 2020 03:38:44 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=x4MeyFSFyD0ObqxqHPwZ654lN3LfEa2iZcCrsyI5Mc8=; b=jc6ZVeg6B+iyu8wO3m+nWBKE0a kwmmgIHkHzLQu7mZJQzhmUhh8CnD7RdU9/t6DNtARJ0JfWCw8O7Z0Due3fOrtbIpN9nzeQ8+rNYpZ rJ/MGr6gF0E8XimDXMIwx9gOvMHFNELsetL3cM1SrRaxS0vu/GRACq1ePazMndpdu7yo=; Received: from vas by admin.sibptus.ru with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1it1QB-000EJ1-3i; Sun, 19 Jan 2020 10:38:43 +0700 Date: Sun, 19 Jan 2020 10:38:43 +0700 From: Victor Sudakov To: Julian Elischer Cc: Eugene Grosbein , freebsd-net@freebsd.org, "Andrey V. Elsukov" , Michael Tuexen Subject: Re: IPSec transport mode, mtu, fragmentation... Message-ID: <20200119033843.GB54797@admin.sibptus.ru> References: <4cc83b85-dd30-8c0d-330e-aa549ce98c98@yandex.ru> <20200116155305.GA465@admin.sibptus.ru> <55f7bafa-24c4-9810-0d21-f82cb332ee2d@grosbein.net> <20200116160745.GA1356@admin.sibptus.ru> <72355e03-1cf8-c58f-3aec-b0a21e631870@grosbein.net> <20200117093645.GA51899@admin.sibptus.ru> <70b0b855-189b-03c2-0712-fc1e35640702@grosbein.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 480gWS2wK5z3JQG X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLY(-4.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 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, 19 Jan 2020 03:38:44 -0000 --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Julian Elischer wrote: > >=20 > > > Back to the point. I've figured out that both encrypted (in transport > > > mode) and unencrypted TCP segments have the same MSS=3D1460. Then I'm > > > completely at a loss how the encrypted packets avoid being fragmented. > > > TCP has no way to know in advance that encryption overhead will be > > > added. > Using multiple routing tables we could add a mechanism to the ipsec > code so that encapsulated sessions are referred to one routing table > and that the "envelope" routes are referencing another (specified in > ipsec setup) routing table.=A0 The two routing tables would have different > MTUs.=A0 This mechanism/framework would also be useful for other > tunneling protocols in general. I think before inventing something so innovative and clever, we should look at how IPSec transport mode and MTU adjustment is implemented in other OSes (OpenBSD, Linux, even Windows). Any experts? --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeI89DAAoJEA2k8lmbXsY0TIQH/0vVBsG4TXRkaqmg5S9IvTR4 NjBADwPE7D+zU6yQy9Gt0GMY+Pm64iIhU/zejBhdd/Qx8aB9O+QRMY4oofi+2p7Y QeIoXn1mm6WeqOr9u4kXWFIl1k73kQw77k9t1QGBKIB8hA/J/tvYBSBBkUSwqx7a w5hLS4yMOLg8zygDg61StE9lI9rbKmDjyYpwn7iZzAECYKw4YfhTiaAi1u8gSz/e FGPRtkztKAAqcIBboTkB3KUP4G0snee4WpKrU4Y4Y23OEo3GcUZC8d6P2/yYAiAz DFT9iGnZADHpcPM+0S4r9efedT9uum9cTYvxdhEJiIuyJto8I6CZJHR3tOdbIEo= =hY+L -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt--