mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
ec9dcd3507
commit
aed069df09
10 changed files with 47 additions and 72 deletions
|
@ -105,8 +105,7 @@ struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
|
|||
__be16 flags, __be64 tunnel_id,
|
||||
int md_size);
|
||||
|
||||
static inline struct sk_buff *udp_tunnel_handle_offloads(struct sk_buff *skb,
|
||||
bool udp_csum)
|
||||
static inline int udp_tunnel_handle_offloads(struct sk_buff *skb, bool udp_csum)
|
||||
{
|
||||
int type = udp_csum ? SKB_GSO_UDP_TUNNEL_CSUM : SKB_GSO_UDP_TUNNEL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue