Revert "ANDROID: net: bpf: permit redirect from ingress L3 to egress L2 devices at...
authorCosmin Tanislav <demonsingur@gmail.com>
Thu, 16 May 2024 07:52:16 +0000 (10:52 +0300)
committerCosmin Tanislav <demonsingur@gmail.com>
Thu, 16 May 2024 07:58:23 +0000 (10:58 +0300)
This reverts commit 69eb478ff932476b208d2e7e97137ced5665fa04.

net/core/filter.c

index 183e281a48200f9077a5f5e425792e9db5c647b7..912a4cfb4384704926712b70c4c05273c55dfd1a 100644 (file)
@@ -2281,8 +2281,6 @@ static int bpf_skb_net_shrink(struct sk_buff *skb, u32 len_diff)
 
 static u32 __bpf_skb_max_len(const struct sk_buff *skb)
 {
-       if (skb_at_tc_ingress(skb) || !skb->dev)
-               return SKB_MAX_ALLOC;
        return skb->dev->mtu + skb->dev->hard_header_len;
 }