From owner-freebsd-net@freebsd.org Tue Apr 17 14:33:08 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C469FA77F9 for ; Tue, 17 Apr 2018 14:33:08 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 789BA7A040; Tue, 17 Apr 2018 14:33:07 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward102j.mail.yandex.net (Yandex) with ESMTP id 9C0575603077; Tue, 17 Apr 2018 17:33:04 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UpJy79mWEM-X4eGvddX; Tue, 17 Apr 2018 17:33:04 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1523975584; bh=GWfyecMiFnNz3s27x1l27ME8I3a/LkZ11csgYjsyyMc=; h=Subject:To:References:From:Cc:Message-ID:Date:In-Reply-To; b=BAdlJ4eO1tP4TBhHC3ApYkUUIMT2kFe51sk+yFVPG9PbkIak2yNmTMezNQB+/qmqS gH1XLvG7fBC3sKRP57zBEPqdZb41AV1HF5hnj94mJEzsie0peV1o6wA5vS3/ZhwOWd uo4+PclxGOjN3G21iFcPpWQIz9aSHa8oUYOTLTBg= Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 1Tu0jVNSYr-WvOiACXU; Tue, 17 Apr 2018 17:32:57 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1523975577; bh=GWfyecMiFnNz3s27x1l27ME8I3a/LkZ11csgYjsyyMc=; h=Subject:To:References:From:Cc:Message-ID:Date:In-Reply-To; b=INTBNf2J6WrcSQq3PFmAflU/B8gfoSzL+PmeSdO9zCZkLq+n1Wki8a4xoYcPtlyMu lYj1zsIfjVG/ACv2kn8JxwIYHY3W04SSTehm7w6erZMBAWatda1iDpXCPKUgZrmr2q DvTCHhRdUQS3UYEq+p1hvBf0pN+yvOuL8XJXwrls= Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: Changed behaviour of pf after new handling of EACCES in tcp_output() in r315514 To: Andreas Longwitz , freebsd-net@freebsd.org References: <5AD5FE79.7050309@incore.de> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEEwECACUCGwMGCwkI BwM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rQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Cc: =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= Message-ID: <1f7edaeb-8a88-a99c-b427-cc19a693172a@yandex.ru> Date: Tue, 17 Apr 2018 17:30:23 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <5AD5FE79.7050309@incore.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lw808qZzzgeNEq6ML48FjGZTEyXuvRFxd" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Apr 2018 14:33:08 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lw808qZzzgeNEq6ML48FjGZTEyXuvRFxd Content-Type: multipart/mixed; boundary="lygZft0n8hf9m9ZpvQCPiCpj7Yopi2XKC"; protected-headers="v1" From: "Andrey V. Elsukov" To: Andreas Longwitz , freebsd-net@freebsd.org Cc: =?UTF-8?Q?Olivier_Cochard-Labb=c3=a9?= Message-ID: <1f7edaeb-8a88-a99c-b427-cc19a693172a@yandex.ru> Subject: Re: Changed behaviour of pf after new handling of EACCES in tcp_output() in r315514 References: <5AD5FE79.7050309@incore.de> In-Reply-To: <5AD5FE79.7050309@incore.de> --lygZft0n8hf9m9ZpvQCPiCpj7Yopi2XKC Content-Type: multipart/mixed; boundary="------------7915F228C458056179B8E832" Content-Language: en-US This is a multi-part message in MIME format. --------------7915F228C458056179B8E832 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 17.04.2018 17:02, Andreas Longwitz wrote: > and in V11 with commit r315514 the same reply after 90 seconds, in the > meantime telnet is waiting on WCHAN "connec": >=20 > Di. 17 Apr. 2018 10:46:28 CEST > Trying 192.168.0.122... > telnet: connect to address 192.168.0.122: Permission denied > telnet: Unable to connect to remote host > Di. 17 Apr. 2018 10:47:43 CEST >=20 > I like to know if this is intended behaviour. This change was based on https://svnweb.freebsd.org/base?view=3Drevision&revision=3D309610 Now I think it can be removed, because: 1. SAs should be configured by application before initiating of TCP connection; 2. If there are no matching SAs, connection will be dropped after several tries. 3. Even if connection will be dropped after first failed SYN, there is special tcps_sig_err_buildsig error counter, that will be incremented and we can determine the cause. So, can you try this patch? And maybe someone who uses TCP-MD5 can try it too (with and without configured SAs)? --=20 WBR, Andrey V. Elsukov --------------7915F228C458056179B8E832 Content-Type: text/x-patch; name="tcp_output.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tcp_output.c.diff" Index: tcp_output.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- tcp_output.c (revision 332505) +++ tcp_output.c (working copy) @@ -1586,8 +1586,6 @@ timer: SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) { case EACCES: - tp->t_softerror =3D error; - return (0); case EPERM: tp->t_softerror =3D error; return (error); --------------7915F228C458056179B8E832-- --lygZft0n8hf9m9ZpvQCPiCpj7Yopi2XKC-- --lw808qZzzgeNEq6ML48FjGZTEyXuvRFxd 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 - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlrWBQQACgkQAcXqBBDI oXoKKQf+NA8YJztTL/gfn3W6hzmZYIRiWwAQOXK5hJYY1qTskv+zSlbX0VGZudA6 MnnaEo40jNeUsnoYUHqWLtf4QbsAsrCYIL2/irl4Q00PqzEuYZioxXlCMH5w8Q2b U96BMlpia4s4POuYiWP4++fsM8cJpECVu1VlpDle1m8AgPx+8LB0Q3OJs9sG1dzj gLtdrb8rlJ7p7ocOokevcB9A2ZX1G+GZyg8MUBvgi7vOYRLrSUozMVLPiNGyhML0 od1Cr2ValFl4BOuOb/zlzqrdGhNcJzvGpajXfXKs5KQiYlpsfOo7KLQdEvGzy7dT zz41iaB1Dygam2wQp9ofQvGepmAV1A== =NuV4 -----END PGP SIGNATURE----- --lw808qZzzgeNEq6ML48FjGZTEyXuvRFxd--