mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-04 12:13:43 +00:00
ipv4: ip_gre: fix return value check in erspan_fb_xmit()
goto err_free_skb if an unexpected result is returned by pskb_tirm() in erspan_fb_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
bce5603365
commit
02d84f3eb5
@ -548,7 +548,8 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
goto err_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 err_free_skb;
|
||||
truncate = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user