Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1943870lqg; Mon, 4 Mar 2024 08:16:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVrNN2/2ocTauzZ2U7ta1lvuzoq3sKx3hqaNy1JuZ/kdk4WpDmmeKamJdhSkcZ78T3z6fktWztwwLK8ekqgoWIYOlyVaAZSsyXour0i4A== X-Google-Smtp-Source: AGHT+IGVtLb/ymHFYbaqmccP2qoCwruAnLwwBHBs/lhUtvHcpgv9sFZOm0MEnhdiAvfBy0zRjsUR X-Received: by 2002:a05:6402:1d91:b0:566:b09e:8d24 with SMTP id dk17-20020a0564021d9100b00566b09e8d24mr5652826edb.12.1709568977408; Mon, 04 Mar 2024 08:16:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709568977; cv=pass; d=google.com; s=arc-20160816; b=HesU2cowbEbmx1yB5iyYKWEPxKtX9uoQIgezafyuNvCZpqtaHaZ8FPWjmKmiYsLjmP ZQd0FdBGESaxOhaJY/EAFiRMSnDO0NUps68TCnHTYdAQqN7xHFDWud1tAbacRd9SaHIl nWUYcw0S/KcSh0JNmLnG2K4eQDvYkbeMRuwCHyO8LLvLaXDqUe4wT4dIlDd+4j2ghQAl 7D4pjHaP4ymAGdK1Rs2PUVuU2a6A4OeZ3tX+CY5twgijerStjOWI5lUDFxZ0p2PL1p53 zGoWAXgazhTSFrk+25peiXZp8cyqDj0sMPudj3EwxYWenTV4OE63un3HD2WSbWW50yvT WoHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jxRGKlwLl4pFQ7395jRqzbwP9120JJMaawqWiGbAxho=; fh=/UxYN16V4xNENsHoOLGLgpRC44oLRcRb5Yle0t7G+Jk=; b=w2KgpaBajsIdWJGnrH526iA918wG3qftaHEroySpuWY2Y/i3DeXcYKzACewdXtV4TQ vFQKwUwVM+J8tvft7+uT/Og8nDf8fntNZDNUERhyZLTF3hXDaFDk2m3LFkKrJYzGczHJ 95zZHLfDNMmYKk6WMCWUiG1kBbx8yWFgjXmtKuYz/pqc5KTkq4hByszd3GjzI6OUddas 2RPz7CJmKfnhfnU+/lyH7X1dALYfcdSJmVNx30Hu2SsXZK4Rd3AV+MWCgAiju94EzOfb wOztkl6Q0tRvGn/AK0ghsuhB6OXmpMM6z1SUt0BNCjaC+DqX4jb2H4SNMP8t7Y4OdjG+ p/2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AJvKJ2jz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id d18-20020a50cd52000000b005675d5262c3si717501edj.438.2024.03.04.08.16.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 08:16:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AJvKJ2jz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90916-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90916-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F40941F22BD2 for ; Mon, 4 Mar 2024 16:16:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB1BF495F0; Mon, 4 Mar 2024 16:15:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AJvKJ2jz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8ECFA4AED4; Mon, 4 Mar 2024 16:15:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709568957; cv=none; b=pzRfYJnsIy2Q6TKbNnwgUuxsWcV8UFpjCmOaULuxohGLoXuNIZx9Ecy3X5XCPJZeewRXLoMUtVhmKIkakcKBQwwAjs2wAhmm4kmRI5fnkH9ZHrI5Fg5kDPkhl7MNfqoF1antotittuaRRs/mlXshr5wmXE0q+bw15hZTIrJSEjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709568957; c=relaxed/simple; bh=5UjUBHQcbiA7fW0QY/jq4aDeSZ3PgJ6ZY2uuh+R3gIk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EwvHaFEj8JgwEKCOcPZeSgMB+DiMPKlaJWMDFIsHQRqSAlu7e7eqw6VgsbIk3ekzw/igoeRDBDIylnBIUrSkLWV6LJDmh1lIr2AGnYmK0w64+mhETXTfgVvGyKrzMiAjkkw/3WnkYpKeIrm3mtv9RUunzthhGnH5Ec02vXtnIsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AJvKJ2jz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A9BCC433C7; Mon, 4 Mar 2024 16:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709568956; bh=5UjUBHQcbiA7fW0QY/jq4aDeSZ3PgJ6ZY2uuh+R3gIk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AJvKJ2jz657aI/dArKolO9jKBpef5omnFl+tyfudMjVk6f7AL2CM+UzGuzfNfQ45n 13V0nIWLWY7hC7hhWvmmYFfosJZ5J6PUspBj5XIQeAOUDvpodectdCJD2B8XrwWlU0 P5xhZIONHSOmBoFmMeh7xuQuI8T072DEJrV6bpD+dLVXZp74NA/g1SWZ6+RxOBo8kb PNvNJeZvTcUfOW518kOm+TeLAbxiH3UlnnU3UO04O4oHWN2vFmJC0O0Ov/T4reS8F1 6wAfDj97gId/z9cQP1GrViIv/oeYqssQZO8nbwSPJq6xgTzIyEATZ3+sUvYt1Ia8cV C+EX6pYJBeA4A== Date: Mon, 4 Mar 2024 17:15:52 +0100 From: Alejandro Colomar To: Oliver Crumrine Cc: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] ip.7: Add not supported by SOCK_STREAM to socket options Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ux3VpOsCkBw0zK1k" Content-Disposition: inline In-Reply-To: --ux3VpOsCkBw0zK1k Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Date: Mon, 4 Mar 2024 17:15:52 +0100 From: Alejandro Colomar To: Oliver Crumrine Cc: linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] ip.7: Add not supported by SOCK_STREAM to socket options Hi Oliver, On Sat, Mar 02, 2024 at 01:19:42PM -0500, Oliver Crumrine wrote: > It was not made clear in several socket options that they were not > supported by SOCK_STREAM; this patch fixes that. >=20 > Socket options not supported by SOCK_STREAM are handled in the > ip_cmsg_recv_offset function in net/ipv4/ip_sockglue.c. The function is > called for udp sockets, and indirectly by ping and raw sockets, but not > for TCP sockets, as they don't support these options. >=20 > Signed-off-by: Oliver Crumrine Could you write some small example programs demonstrating that these are not supported? I'd like to check it with a small program, if possible. Have a lovely say! Alex > --- > man7/ip.7 | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/man7/ip.7 b/man7/ip.7 > index 2b4b06324..104e65feb 100644 > --- a/man7/ip.7 > +++ b/man7/ip.7 > @@ -828,6 +828,9 @@ is not zero, the primary local address of the interfa= ce specified by the > index overwrites > .I ipi_spec_dst > for the routing table lookup. > +Not supported for > +.B SOCK_STREAM > +sockets. > .TP > .BR IP_RECVERR " (since Linux 2.2)" > .\" Precisely: since Linux 2.1.15 > @@ -989,6 +992,9 @@ in which the kernel returns the original destination = address > of the datagram being received. > The ancillary message contains a > .IR "struct sockaddr_in" . > +Not supported for > +.B SOCK_STREAM > +sockets. > .TP > .BR IP_RECVTOS " (since Linux 2.2)" > .\" Precisely: since Linux 2.1.68 > @@ -998,6 +1004,9 @@ ancillary message is passed with incoming packets. > It contains a byte which specifies the Type of Service/Precedence > field of the packet header. > Expects a boolean integer flag. > +Not supported for > +.B SOCK_STREAM > +sockets. > .TP > .BR IP_RECVTTL " (since Linux 2.2)" > .\" Precisely: since Linux 2.1.68 > --=20 > 2.44.0 >=20 --=20 Looking for a remote C programming job at the moment. --ux3VpOsCkBw0zK1k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAABCgAdFiEE6jqH8KTroDDkXfJAnowa+77/2zIFAmXl87gACgkQnowa+77/ 2zJe2Q/3SJ6w3CPhRqqEtV98dUTnuRY47cAGYcQKTUTLUii6nI32EPqc2+jBRIQx SEUqj/JK1aRQ72wr9cAIaSHV6qu6Xuk2NXtO7+Abur+njoBuQDwq7Az9nspihvnE txUmwZJqWOewqcpTZdgqWa5AuQbF9ksd12lsAPAO+eU3vJGSFJTCc/dRXrsM5d6r 8d9VEmVIskDJoTWDnt88bpt3ozxWhaFK217VpOiR0L5o/6OTV1Ho4xfUOujRnysf AKqT1L95b9RhtpmRSaCTAkl7NIDf5UIfEeLKK1gJOBO19w11g0wi9TvICEGMvopH GuKvdsPvkO6iQp83WUVK7SeYY3c7TcG2sk6A2JJpIvvkc3CzbxibE4X0lBRceqQj oVkb5xLiQ91qpNlQY2P4Ixo1AvwSJjkFzvnnbOvM6/lYducs425tcBAsNsAwp0a5 xXm7crlvxXmBxsqfmddIGuCMjilLb0sCn0gaCKk9bYVaOTwWLSUsx2H0gdRMVhcH RthLFZyDJoHNvocwOsgwKBCtMf1wBgRI5be4qlE8X6yTYSl+gF3+3ujevU/8e7bK k+3VVShtn22ycP23Tj0oU9jyVhx9IUIcP+7xwxEpnQle34FSVl4JNK/faZpZLlAz Jh9FjkFDfUzsd/w7j6QjC8UZY8/h7J56y86bWzZd7IqQe9jOvQ== =AgFf -----END PGP SIGNATURE----- --ux3VpOsCkBw0zK1k--