summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTommi Rantala <tt.rantala@gmail.com>2013-02-06 03:24:02 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-14 10:48:19 -0800
commitea6a9fca541b3dfdc8085f1493f4794f9baddfe9 (patch)
tree1261ff61dee3d3fcddcaba4ebd918a12ad07a685 /net
parent29cb024d2df4072cba88d8c7e62cc7617fbb689d (diff)
ipv6/ip6_gre: fix error case handling in ip6gre_tunnel_xmit()
[ Upstream commit 41ab3e31bd50b42c85ac0aa0469642866aee2a9a ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_gre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index d5cb3c4e66f8..a23350c50552 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -976,7 +976,7 @@ static netdev_tx_t ip6gre_tunnel_xmit(struct sk_buff *skb,
int ret;
if (!ip6_tnl_xmit_ctl(t))
- return -1;
+ goto tx_err;
switch (skb->protocol) {
case htons(ETH_P_IP):