Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipv6: Remove UDP-Lite support for IPV6_ADDRFORM.

We cannot create IPv6 UDP-Lite sockets anymore.

Let's remove dead code in IPV6_ADDRFORM.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260311052020.1213705-4-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
92586f02 62554a51

+4 -13
+4 -13
net/ipv6/ipv6_sockglue.c
··· 45 45 #include <net/inet_common.h> 46 46 #include <net/tcp.h> 47 47 #include <net/udp.h> 48 - #include <net/udplite.h> 49 48 #include <net/xfrm.h> 50 49 #include <net/compat.h> 51 50 #include <net/seg6.h> ··· 562 563 if (sk->sk_type == SOCK_RAW) 563 564 break; 564 565 565 - if (sk->sk_protocol == IPPROTO_UDP || 566 - sk->sk_protocol == IPPROTO_UDPLITE) { 567 - struct udp_sock *up = udp_sk(sk); 568 - if (up->pending == AF_INET6) { 566 + if (sk->sk_protocol == IPPROTO_UDP) { 567 + if (udp_sk(sk)->pending == AF_INET6) { 569 568 retv = -EBUSY; 570 569 break; 571 570 } ··· 604 607 WRITE_ONCE(sk->sk_family, PF_INET); 605 608 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); 606 609 } else { 607 - struct proto *prot = &udp_prot; 608 - 609 - if (sk->sk_protocol == IPPROTO_UDPLITE) 610 - prot = &udplite_prot; 611 - 612 610 sock_prot_inuse_add(net, sk->sk_prot, -1); 613 - sock_prot_inuse_add(net, prot, 1); 611 + sock_prot_inuse_add(net, &udp_prot, 1); 614 612 615 613 /* Paired with READ_ONCE(sk->sk_prot) in inet6_dgram_ops */ 616 - WRITE_ONCE(sk->sk_prot, prot); 614 + WRITE_ONCE(sk->sk_prot, &udp_prot); 617 615 WRITE_ONCE(sk->sk_socket->ops, &inet_dgram_ops); 618 616 WRITE_ONCE(sk->sk_family, PF_INET); 619 617 } ··· 1090 1098 switch (optname) { 1091 1099 case IPV6_ADDRFORM: 1092 1100 if (sk->sk_protocol != IPPROTO_UDP && 1093 - sk->sk_protocol != IPPROTO_UDPLITE && 1094 1101 sk->sk_protocol != IPPROTO_TCP) 1095 1102 return -ENOPROTOOPT; 1096 1103 if (sk->sk_state != TCP_ESTABLISHED)