Commit e5075c0b authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: flowtable: call dst_check() to fall back to classic forwarding

In case the route is stale, pass up the packet to the classic forwarding
path for re-evaluation and schedule this flow entry for removal.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent f4401262
...@@ -197,14 +197,6 @@ static bool nf_flow_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu) ...@@ -197,14 +197,6 @@ static bool nf_flow_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
return true; return true;
} }
static int nf_flow_offload_dst_check(struct dst_entry *dst)
{
if (unlikely(dst_xfrm(dst)))
return dst_check(dst, 0) ? 0 : -1;
return 0;
}
static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb, static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
struct dst_entry *dst) struct dst_entry *dst)
...@@ -256,7 +248,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb, ...@@ -256,7 +248,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
flow_offload_refresh(flow_table, flow); flow_offload_refresh(flow_table, flow);
if (nf_flow_offload_dst_check(&rt->dst)) { if (!dst_check(&rt->dst, 0)) {
flow_offload_teardown(flow); flow_offload_teardown(flow);
return NF_ACCEPT; return NF_ACCEPT;
} }
...@@ -476,7 +468,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb, ...@@ -476,7 +468,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
flow_offload_refresh(flow_table, flow); flow_offload_refresh(flow_table, flow);
if (nf_flow_offload_dst_check(&rt->dst)) { if (!dst_check(&rt->dst, 0)) {
flow_offload_teardown(flow); flow_offload_teardown(flow);
return NF_ACCEPT; return NF_ACCEPT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment