mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
ipv4: ip_gre: fix return value check in erspan_xmit()
goto free_skb if an unexpected result is returned by pskb_tirm() in erspan_xmit(). Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
02d84f3eb5
commit
aa7cb3789b
@ -690,7 +690,8 @@ static netdev_tx_t erspan_xmit(struct sk_buff *skb,
|
||||
goto free_skb;
|
||||
|
||||
if (skb->len > dev->mtu + dev->hard_header_len) {
|
||||
pskb_trim(skb, dev->mtu + dev->hard_header_len);
|
||||
if (pskb_trim(skb, dev->mtu + dev->hard_header_len))
|
||||
goto free_skb;
|
||||
truncate = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user