All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	David Ahern <dsahern@kernel.org>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: [PATCH v1 net-next 03/14] ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE.
Date: Mon, 29 May 2023 18:03:37 -0700	[thread overview]
Message-ID: <20230530010348.21425-4-kuniyu@amazon.com> (raw)
In-Reply-To: <20230530010348.21425-1-kuniyu@amazon.com>

The previous commit removes UDP-Lite v6 support, so conversion
from UDP-Lite v6 to v4 never occurs.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
 net/ipv6/ipv6_sockglue.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index ae818ff46224..150cd6620315 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -45,7 +45,6 @@
 #include <net/inet_common.h>
 #include <net/tcp.h>
 #include <net/udp.h>
-#include <net/udplite.h>
 #include <net/xfrm.h>
 #include <net/compat.h>
 #include <net/seg6.h>
@@ -434,10 +433,8 @@ int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
 			if (sk->sk_type == SOCK_RAW)
 				break;
 
-			if (sk->sk_protocol == IPPROTO_UDP ||
-			    sk->sk_protocol == IPPROTO_UDPLITE) {
-				struct udp_sock *up = udp_sk(sk);
-				if (up->pending == AF_INET6) {
+			if (sk->sk_protocol == IPPROTO_UDP) {
+				if (udp_sk(sk)->pending == AF_INET6) {
 					retv = -EBUSY;
 					break;
 				}
@@ -478,16 +475,11 @@ int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
 				sk->sk_family = PF_INET;
 				tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
 			} else {
-				struct proto *prot = &udp_prot;
-
-				if (sk->sk_protocol == IPPROTO_UDPLITE)
-					prot = &udplite_prot;
-
 				sock_prot_inuse_add(net, sk->sk_prot, -1);
-				sock_prot_inuse_add(net, prot, 1);
+				sock_prot_inuse_add(net, &udp_prot, 1);
 
 				/* Paired with READ_ONCE(sk->sk_prot) in inet6_dgram_ops */
-				WRITE_ONCE(sk->sk_prot, prot);
+				WRITE_ONCE(sk->sk_prot, &udp_prot);
 				sk->sk_socket->ops = &inet_dgram_ops;
 				sk->sk_family = PF_INET;
 			}
@@ -1137,7 +1129,6 @@ int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
 	switch (optname) {
 	case IPV6_ADDRFORM:
 		if (sk->sk_protocol != IPPROTO_UDP &&
-		    sk->sk_protocol != IPPROTO_UDPLITE &&
 		    sk->sk_protocol != IPPROTO_TCP)
 			return -ENOPROTOOPT;
 		if (sk->sk_state != TCP_ESTABLISHED)
-- 
2.30.2


  parent reply	other threads:[~2023-05-30  1:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  1:03 [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 01/14] udp: Random clenaup Kuniyuki Iwashima
2023-05-30 12:56   ` Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 02/14] udplite: Retire UDP-Lite for IPv6 Kuniyuki Iwashima
2023-05-30 13:01   ` Simon Horman
2023-05-30 17:49     ` Kuniyuki Iwashima
2023-05-30  1:03 ` Kuniyuki Iwashima [this message]
2023-05-30 14:22   ` [PATCH v1 net-next 03/14] ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 04/14] udplite: Retire UDP-Lite for IPv4 Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 05/14] udp: Remove UDP-Lite SNMP stats Kuniyuki Iwashima
2023-05-30 14:24   ` Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 06/14] udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 07/14] udp: Remove pcslen, pcrlen, and pcflag in struct udp_sock Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 08/14] udp: Remove csum branch for UDP-Lite Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 09/14] udp: Don't pass proto to udp[46]_csum_init() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 10/14] udp: Don't pass proto to __udp[46]_lib_rcv() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 11/14] udp: Optimise ulen tests in __udp[46]_lib_rcv() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 12/14] udp: Remove udp_table in struct proto Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 13/14] udp: Remove udp_table in struct udp_seq_afinfo Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 14/14] udp: Don't pass udp_table to __udp[46]_lib_lookup() Kuniyuki Iwashima
2023-05-30  2:15 ` [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite Willem de Bruijn
2023-05-30 17:34   ` Kuniyuki Iwashima
2023-05-30 20:16     ` Willem de Bruijn
2023-05-30 22:14       ` Jakub Kicinski
2023-05-31  1:01         ` Kuniyuki Iwashima
2023-05-31  4:25           ` Eric Dumazet
2023-05-31  5:10             ` Jakub Kicinski
2023-05-31  6:24               ` Paolo Abeni
2023-05-31  6:44                 ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530010348.21425-4-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.