Skip to content

Commit 41ab3e3

Browse files
rantaladavem330
authored andcommitted
ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
ip6gre_tunnel_xmit() is leaking the skb when we hit this error branch, and the -1 return value from this function is bogus. Use the error handling we already have in place in ip6gre_tunnel_xmit() for this error case to fix this. Signed-off-by: Tommi Rantala <tt.rantala@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6731d20 commit 41ab3e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/ip6_gre.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ static netdev_tx_t ip6gre_tunnel_xmit(struct sk_buff *skb,
960960
int ret;
961961

962962
if (!ip6_tnl_xmit_ctl(t))
963-
return -1;
963+
goto tx_err;
964964

965965
switch (skb->protocol) {
966966
case htons(ETH_P_IP):

0 commit comments

Comments
 (0)