]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smack: Remove IPPROTO_UDPLITE support in security_sock_rcv_skb().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 11 Mar 2026 05:19:53 +0000 (05:19 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Mar 2026 01:57:44 +0000 (18:57 -0700)
smack_socket_sock_rcv_skb() is registered as socket_sock_rcv_skb,
which is called as security_sock_rcv_skb() in sk_filter_trim_cap().

Now that UDP-Lite is gone, let's remove the IPPROTO_UDPLITE support
in smack_socket_sock_rcv_skb().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Link: https://patch.msgid.link/20260311052020.1213705-7-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
security/smack/smack_lsm.c

index 98af9d7b943469d0ddd344fc78c0b87ca40c16c4..e581d646594658d31d5f72f06bb8c04f0d39a574 100644 (file)
@@ -4176,7 +4176,6 @@ static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip)
                        sip->sin6_port = th->source;
                break;
        case IPPROTO_UDP:
-       case IPPROTO_UDPLITE:
                uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph);
                if (uh != NULL)
                        sip->sin6_port = uh->source;
@@ -4301,8 +4300,7 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
 #if IS_ENABLED(CONFIG_IPV6)
        case PF_INET6:
                proto = smk_skb_to_addr_ipv6(skb, &sadd);
-               if (proto != IPPROTO_UDP && proto != IPPROTO_UDPLITE &&
-                   proto != IPPROTO_TCP)
+               if (proto != IPPROTO_UDP && proto != IPPROTO_TCP)
                        break;
 #ifdef SMACK_IPV6_SECMARK_LABELING
                skp = smack_from_skb(skb);