mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
netfilter: flowtable: set inner protocol when popping tunnel header
Pop the outer tunnel header and set skb->protocol to the inner protocol derived from ctx->tun.inner_proto in nf_flow_ip_tunnel_pop(), instead of bailing out unless the tunnel carries IP-in-IP or IPv6-in-IPv6. This is a preliminary patch to support IPv4 over IPv6 and SIT tunnel flowtable offload. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
ac364eb4d6
commit
cae023143d
|
|
@ -372,6 +372,11 @@ static void nf_flow_ip_tunnel_pop(struct nf_flowtable_ctx *ctx,
|
|||
|
||||
skb_pull(skb, ctx->tun.hdr_size);
|
||||
skb_reset_network_header(skb);
|
||||
|
||||
if (ctx->tun.inner_proto == IPPROTO_IPIP)
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
else
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
}
|
||||
|
||||
static bool nf_flow_skb_encap_protocol(struct nf_flowtable_ctx *ctx,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user