From owner-freebsd-net@freebsd.org Fri Jan 17 15:04:50 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 AD7F61F0946 for ; Fri, 17 Jan 2020 15:04:50 +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 47zkr14bsYz4Zx5; Fri, 17 Jan 2020 15:04:49 +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=Vpbg2uUZ5xB7J9wjo36LA1mFBJGdmf6F92B/jwPm0nU=; b=Tlc0q1p9UgPrk4EGs8fA5u9LPw Ug2Ivyj9KGEHI+T9toqLCDXCpu+CTO7SNAfYU7ZTky6BZ9Qda8x3+qwqEQjeqotFEsklfw/V7G2W6 XkZKu566E1E9IJpcvATl3DD+i9S3u6YMJUSveT4hQHYa3aHct2SxFfYd4MSLJSFJxrjw=; Received: from vas by admin.sibptus.ru with local (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1isTAz-000HMt-16; Fri, 17 Jan 2020 22:04:45 +0700 Date: Fri, 17 Jan 2020 22:04:45 +0700 From: Victor Sudakov To: "Andrey V. Elsukov" Cc: Eugene Grosbein , freebsd-net@freebsd.org, Michael Tuexen Subject: Re: IPSec transport mode, mtu, fragmentation... Message-ID: <20200117150445.GA66677@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> <7c153a5a-db38-2770-89c7-9f95f59d29de@yandex.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline In-Reply-To: <7c153a5a-db38-2770-89c7-9f95f59d29de@yandex.ru> 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: 47zkr14bsYz4Zx5 X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=Tlc0q1p9; 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]; 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.70), 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)[]; FREEMAIL_TO(0.00)[yandex.ru]; 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:04:50 -0000 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Andrey V. Elsukov wrote: > On 17.01.2020 12:36, Victor Sudakov wrote: > > 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 > For IPsec endpoints (i.e. when you encrypt own sessions) TCP for each > outgoing packet invokes IPSEC_HDRSIZE() method, that returns approximate > size required for IPsec, and using this information it calculates MSS.=20 I observe in Wireshark that the MSS is the same in encrypted and unencrypted segments. > I think this should work in this way. Obviouisly it is not working this way, if it were, I'd see different MSS values, but this is not the case. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --bg08WKrSYDhXBjb5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeIc0NAAoJEA2k8lmbXsY0Pr4IAKh6vDcxWXYVHdSw21S09UWs OEQexRibu/osY0kH1llsyZLczBoEZ3mKOW571ld7FFA7r7Scyh/KejppWYRVZTp4 1bMGwV73Zy4Z78D6FR5L/zZ5Ga6b8brj0DU4PZtKeqj5O8rdEYPFIGmB/n1GBkWr YuPqSFQtyMFwRmLvQVKGbVJmV7025yBZWx2LapVPqEjKfALHU3bKX1ELOUXOpNT5 Tf/bH4d8dow2c+/3+M7wJc+iMT1ylLwQdps1IbWXIWoTzCkn3EuI6ms3RDfej9Rp ku9ms1kfpSMUHnhuTuRTPSAUvZi1MuT8YN/7dI6qMJGp3b1zo5clxbugtyhFk5o= =Z0mt -----END PGP SIGNATURE----- --bg08WKrSYDhXBjb5--