aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-04-14 15:33:37 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-16 19:09:13 -0400
commitaed069df099cd1a27900acb56bb892ec24c66ac4 (patch)
tree8d25251d281421e71d2a30b9c72716885217c5e3 /net/netfilter
parentec9dcd3507f055f025a7692a1ff90ce105f84c1b (diff)
ip_tunnel_core: iptunnel_handle_offloads returns int and doesn't free skb
This patch updates the IP tunnel core function iptunnel_handle_offloads so that we return an int and do not free the skb inside the function. This actually allows us to clean up several paths in several tunnels so that we can free the skb at one point in the path without having to have a secondary path if we are supporting tunnel offloads. In addition it should resolve some double-free issues I have found in the tunnels paths as I believe it is possible for us to end up triggering such an event in the case of fou or gue. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index dc196a0f501d..6d19d2eeaa60 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -1013,8 +1013,7 @@ ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp,
1013 if (IS_ERR(skb)) 1013 if (IS_ERR(skb))
1014 goto tx_error; 1014 goto tx_error;
1015 1015
1016 skb = iptunnel_handle_offloads(skb, __tun_gso_type_mask(AF_INET, cp->af)); 1016 if (iptunnel_handle_offloads(skb, __tun_gso_type_mask(AF_INET, cp->af)))
1017 if (IS_ERR(skb))
1018 goto tx_error; 1017 goto tx_error;
1019 1018
1020 skb->transport_header = skb->network_header; 1019 skb->transport_header = skb->network_header;
@@ -1105,8 +1104,7 @@ ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
1105 if (IS_ERR(skb)) 1104 if (IS_ERR(skb))
1106 goto tx_error; 1105 goto tx_error;
1107 1106
1108 skb = iptunnel_handle_offloads(skb, __tun_gso_type_mask(AF_INET6, cp->af)); 1107 if (iptunnel_handle_offloads(skb, __tun_gso_type_mask(AF_INET6, cp->af)))
1109 if (IS_ERR(skb))
1110 goto tx_error; 1108 goto tx_error;
1111 1109
1112 skb->transport_header = skb->network_header; 1110 skb->transport_header = skb->network_header;