From owner-freebsd-net@freebsd.org Thu Jan 16 16:39:17 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 903A11EE83A for ; Thu, 16 Jan 2020 16:39:17 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward100j.mail.yandex.net (forward100j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::100]) (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 47z8zS0fQJz4GFq; Thu, 16 Jan 2020 16:39:15 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward100j.mail.yandex.net (Yandex) with ESMTP id 3898450E0758; Thu, 16 Jan 2020 19:39:12 +0300 (MSK) Received: from myt4-ee976ce519ac.qloud-c.yandex.net (myt4-ee976ce519ac.qloud-c.yandex.net [2a02:6b8:c00:1da4:0:640:ee97:6ce5]) by mxback15g.mail.yandex.net (mxback/Yandex) with ESMTP id mKMJ4OLYFj-dC0CNSF0; Thu, 16 Jan 2020 19:39:12 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1579192752; bh=U3C4pPoCBMDKTfF0RueJpKBUB7RGJUdI8EAwiy76xNQ=; h=In-Reply-To:From:To:Subject:Cc:Date:References:Message-ID; b=nm2xOHyJjrY7mAH5D09TpfN+1q/iuk+4tsmXO7+H4x01ajxOF7+RpGqjgZyKdly5w Ir1wLdPnbmBsT4s3cYYMihxs3fG/LbUNiyR/ry04slH9EgiyGCuOPPrjouxbbtkTzb oW6YL8JFRnIDGgLp49q6mY3uxLFtLzrUghyfzEu0= Received: by myt4-ee976ce519ac.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id NNkRR0jPRe-dBUmMEpN; Thu, 16 Jan 2020 19:39:11 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: IPSec transport mode, mtu, fragmentation... To: Victor Sudakov , Eugene Grosbein Cc: freebsd-net@freebsd.org, Michael Tuexen 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> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <97b07801-da80-0665-aaa9-57184a52ce0f@yandex.ru> Date: Thu, 16 Jan 2020 19:36:51 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200116160745.GA1356@admin.sibptus.ru> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z7OlqF60UnZ6RtaY6Sq9DYDWzQRdoDSQQ" X-Rspamd-Queue-Id: 47z8zS0fQJz4GFq X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=nm2xOHyJ; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of bu7cher@yandex.ru designates 2a02:6b8:0:801:2::100 as permitted sender) smtp.mailfrom=bu7cher@yandex.ru X-Spamd-Result: default: False [-5.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yandex.ru]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0::/52]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yandex.ru:+]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-8.70), ipnet: 2a02:6b8::/32(-4.72), asn: 13238(-3.81), country: RU(0.01)]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; RCVD_TLS_LAST(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.0.1.0.0.0.0.0.0.0.0.0.2.0.0.0.1.0.8.0.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.0] 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: Thu, 16 Jan 2020 16:39:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --z7OlqF60UnZ6RtaY6Sq9DYDWzQRdoDSQQ Content-Type: multipart/mixed; boundary="QTouuRJEBBnaSeob6V7UsC1dhstCu13ya"; protected-headers="v1" From: "Andrey V. Elsukov" To: Victor Sudakov , Eugene Grosbein Cc: freebsd-net@freebsd.org, Michael Tuexen Message-ID: <97b07801-da80-0665-aaa9-57184a52ce0f@yandex.ru> Subject: Re: IPSec transport mode, mtu, fragmentation... 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> In-Reply-To: <20200116160745.GA1356@admin.sibptus.ru> --QTouuRJEBBnaSeob6V7UsC1dhstCu13ya Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 16.01.2020 19:07, Victor Sudakov wrote: > Eugene Grosbein wrote: >> >>> What beats me is that I cannot reproduce this problem in bhyve. In th= is >>> packet dump: http://admin.sibptus.ru/~vas/ipsec1.pcap.gz I'm scp-ing = a >>> 50M file from 192.168.246.10 (bhyve guest) to 192.168.246.1 (bhyve >>> host), and I see no fragments, and the largets packet is 1466 bytes, = and >>> the scp never stalls nor fails. >>> >>> Why is it NOT broken this time? >>> >>> Both hosts are 12.1-RELEASE-p1. >> >> I could not reproduce the problem with unpatched recent stable/11, eit= her :-) >=20 > Is there a way to view the MSS in the TCP segments before encryption or= > after decryption? I want to compare them in situations with IPSec > enabled and disabled. >=20 > I've never been able to see anything in "tcpdump -i enc0", probably it > cannot do transport mode IPSec because the man page talks about "outer > and inner header." For transport mode inner and outer headers will be the same. I guess the problem can be reproduced in the lab using the following conf= ig: [Host A] <--> [Router] <--> [Host B] IPsec should be configured between hosts A and B. Then you need to reduce MTU on the router. This should lead to ICMP NEEDFRAG messages from the router, and then host should correctly handle them. --=20 WBR, Andrey V. Elsukov --QTouuRJEBBnaSeob6V7UsC1dhstCu13ya-- --z7OlqF60UnZ6RtaY6Sq9DYDWzQRdoDSQQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAl4gkSMACgkQAcXqBBDI oXoFCwf/QhJkuf+DeK4lo6sTpaC+MPJwbSrxjzje5JlR3olYkF7rZPfq7heSbNol 6zHXB/gyk+NneppXuqcUmGloBlLZX+1rgPcZfh5re9sQmavQrB5gF9PNQpEe+A/2 TvgMGE05uLsfXmGRYNQqXXoSsYzbiLFYugtNzofG4FRhB3PT93vef2zcpBNZ2XO+ G67zqT1TuqAYuJOZ27Pchaz2lBMKchybe1WALniPTi7wM2voSwXWxPBViwfz0pPr 6NiBdghgM5EcrT/YjS9v0Ovbfi9A6jx5+u7/gE2B93VpgJHVJoL8eDb1rH4lG0T3 iuJmH4lFcn5jv2KGMZXsV9h+O7Dceg== =L09n -----END PGP SIGNATURE----- --z7OlqF60UnZ6RtaY6Sq9DYDWzQRdoDSQQ--