1 From: Pablo Neira Ayuso <pablo@netfilter.org>
2 Date: Tue, 23 Mar 2021 00:56:26 +0100
3 Subject: [PATCH] netfilter: flowtable: call dst_check() to fall back to
6 In case the route is stale, pass up the packet to the classic forwarding
7 path for re-evaluation and schedule this flow entry for removal.
9 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
12 --- a/net/netfilter/nf_flow_table_ip.c
13 +++ b/net/netfilter/nf_flow_table_ip.c
14 @@ -197,14 +197,6 @@ static bool nf_flow_exceeds_mtu(const st
18 -static int nf_flow_offload_dst_check(struct dst_entry *dst)
20 - if (unlikely(dst_xfrm(dst)))
21 - return dst_check(dst, 0) ? 0 : -1;
26 static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
27 const struct nf_hook_state *state,
28 struct dst_entry *dst)
29 @@ -256,7 +248,7 @@ nf_flow_offload_ip_hook(void *priv, stru
31 flow_offload_refresh(flow_table, flow);
33 - if (nf_flow_offload_dst_check(&rt->dst)) {
34 + if (!dst_check(&rt->dst, 0)) {
35 flow_offload_teardown(flow);
38 @@ -476,7 +468,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
40 flow_offload_refresh(flow_table, flow);
42 - if (nf_flow_offload_dst_check(&rt->dst)) {
43 + if (!dst_check(&rt->dst, 0)) {
44 flow_offload_teardown(flow);