xfrm: fix inbound ipv4/udp/esp packets to UDPv6 dualstack sockets
[platform/kernel/linux-starfive.git] / net / ipv6 / xfrm6_input.c
index 04cbeef..4907ab2 100644 (file)
@@ -86,6 +86,9 @@ int xfrm6_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
        __be32 *udpdata32;
        __u16 encap_type = up->encap_type;
 
+       if (skb->protocol == htons(ETH_P_IP))
+               return xfrm4_udp_encap_rcv(sk, skb);
+
        /* if this is not encapsulated socket, then just return now */
        if (!encap_type)
                return 1;