From owner-freebsd-net@freebsd.org Fri Jan 17 15:09:30 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 118B41F0B5F for ; Fri, 17 Jan 2020 15:09:30 +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 47zkxP2DXCz4bBn; Fri, 17 Jan 2020 15:09:29 +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=C0Dogs2ABgVqcn8OM6EsyhA/mGVjfGDU97X4DikX98I=; b=OYolc5bLFcZtaEqrCsXEdJxXkw iM/GdxwIqrysmyTrpoQrqrXKcwZg8k81g7kYoP/bg+5bIeM4fPaeo6QvTzvbwEozv+7R8SnVl7LlK iJpyHaPFhuACGUgkGhJThvJvAQlw4LmMoiuFB+a9lu0Bp1wQptjixGxYrtr4KbI3NJfg=; Received: from vas by admin.sibptus.ru with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1isTFY-000HPY-1h; Fri, 17 Jan 2020 22:09:28 +0700 Date: Fri, 17 Jan 2020 22:09:28 +0700 From: Victor Sudakov To: Eugene Grosbein Cc: freebsd-net@freebsd.org, "Andrey V. Elsukov" , Michael Tuexen Subject: Re: IPSec transport mode, mtu, fragmentation... Message-ID: <20200117150928.GB66677@admin.sibptus.ru> References: <20191220152314.GA55278@admin.sibptus.ru> <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="RASg3xLB4tUQ4RcS" Content-Disposition: inline In-Reply-To: <70b0b855-189b-03c2-0712-fc1e35640702@grosbein.net> 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: 47zkxP2DXCz4bBn X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=OYolc5bL; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-8.42 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; IP_SCORE(-3.32)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.71), country: US(-0.05)]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2] 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: Fri, 17 Jan 2020 15:09:30 -0000 --RASg3xLB4tUQ4RcS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Eugene Grosbein wrote: > 17.01.2020 16:36, Victor Sudakov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=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. >=20 > If outgoing route (f.e. default route) has lower MTU, kernel should respo= nd with EMSGSIZE > to TCP's attempt to send oversized packet when PMTUD is enabled. >=20 > If PMTUD discovers that path mtu is low, it should store this information= in the hostcache > (see sysctl net.inet.tcp.hostcache.list) and use hostcache's MTU for same= goal. Should this result in a smaller MSS in TCP to such hosts? PS "sysctl net.inet.tcp.hostcache.list | grep 192.168.246.11" yields nothing, and yet 192.168.246.11 is the VM with which I have a transport mode SA. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --RASg3xLB4tUQ4RcS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeIc4oAAoJEA2k8lmbXsY0tV8H/2imb08pHf9dWZz5ssP6D9Nu 8U6UJen0w4OPqVDJ3aPp3eoetbg+twP3gIvXPpsxREq3t0VbRy6aPZlrDFT2odO2 rnrlQ9kej/2YqMfPSvhbPUqIMkTkIZX0Vfzke02uEA0gi8gsMuQQ7wYX6iHoo86W SaieSitwaxA4YjnCUse359OLffM6g06uQeWGPEIl08JpKqFb3y9e8EfuS+PcgFhN E0qR9+l15amssoGztDY1Yv/3j/Nm8Zwlv7x0NLNuXuAhpVuOSbIMozvquV+B4bKS YG2/qUXR1oN6bNREM/OLVbSZSUc5CNQE3Z3dlz1BuRlj4cTvIymbCk9LITMDvak= =V3Vg -----END PGP SIGNATURE----- --RASg3xLB4tUQ4RcS--