mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
net: tun: split run_ebpf_filter() and pskb_trim() into different "if statement"
[ Upstream commit 45a15d89fb
]
No functional change.
Just to split the if statement into different conditions to use
kfree_skb_reason() to trace the reason later.
Cc: Joao Martins <joao.m.martins@oracle.com>
Cc: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5d73b79ad3
commit
00272563dc
1 changed files with 4 additions and 1 deletions
|
@ -1097,7 +1097,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
goto drop;
|
||||
|
||||
len = run_ebpf_filter(tun, skb, len);
|
||||
if (len == 0 || pskb_trim(skb, len))
|
||||
if (len == 0)
|
||||
goto drop;
|
||||
|
||||
if (pskb_trim(skb, len))
|
||||
goto drop;
|
||||
|
||||
if (unlikely(skb_orphan_frags_rx(skb, GFP_ATOMIC)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue