Skip to contentSkip to conversation

netfilter: flowtable: use skb_pull_rcsum() to pull IPIP tunnel header

PATCH In review Pablo Neira Ayuso 2 participants 2 messages Oct 20 – Oct 21

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: flowtable: use skb_pull_rcsum() to pull IPIP tunnel header

Use skb_pull_rcsum() to pop the IPIP and IP6IP6 tunnel header so this works with CHECKSUM_COMPLETE.

Fixes ab427db17885 ("netfilter: flowtable: Add IPIP rx sw acceleration")
---
 net/netfilter/nf_flow_table_ip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_flow_table_ip.c +1 -1
index bb894c4f2b4a..f9b6119c9db5 100644
@@ -370,7 +370,7 @@ static void nf_flow_ip_tunnel_pop(struct nf_flowtable_ctx *ctx,
 	    ctx->tun.inner_proto != IPPROTO_IPV6)
 		return;
 
-	skb_pull(skb, ctx->tun.hdr_size);
+	skb_pull_rcsum(skb, ctx->tun.hdr_size);
 	skb_reset_network_header(skb);
 }
 
Signature · 1 line
2.47.3
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines

Use skb_pull_rcsum() to pop the IPIP and IP6IP6 tunnel header so this works with CHECKSUM_COMPLETE.

Fixes ab427db17885 ("netfilter: flowtable: Add IPIP rx sw acceleration")
Quoted 20 lines
---
 net/netfilter/nf_flow_table_ip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_flow_table_ip.c +1 -1
index bb894c4f2b4a..f9b6119c9db5 100644
@@ -370,7 +370,7 @@ static void nf_flow_ip_tunnel_pop(struct nf_flowtable_ctx *ctx,
 	    ctx->tun.inner_proto != IPPROTO_IPV6)
 		return;
 
-	skb_pull(skb, ctx->tun.hdr_size);
+	skb_pull_rcsum(skb, ctx->tun.hdr_size);
 	skb_reset_network_header(skb);
 }
 
Signature · 1 line
2.47.3