Commit aa7cb378 authored by Yuanjun Gong's avatar Yuanjun Gong Committed by David S. Miller

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: default avatarYuanjun Gong <ruc_gongyuanjun@163.com>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 02d84f3e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment