Skip to content

Commit e5075c0

Browse files
committed
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: Pablo Neira Ayuso <[email protected]>
1 parent f440126 commit e5075c0

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

net/netfilter/nf_flow_table_ip.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,6 @@ static bool nf_flow_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
197197
return true;
198198
}
199199

200-
static int nf_flow_offload_dst_check(struct dst_entry *dst)
201-
{
202-
if (unlikely(dst_xfrm(dst)))
203-
return dst_check(dst, 0) ? 0 : -1;
204-
205-
return 0;
206-
}
207-
208200
static unsigned int nf_flow_xmit_xfrm(struct sk_buff *skb,
209201
const struct nf_hook_state *state,
210202
struct dst_entry *dst)
@@ -256,7 +248,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
256248

257249
flow_offload_refresh(flow_table, flow);
258250

259-
if (nf_flow_offload_dst_check(&rt->dst)) {
251+
if (!dst_check(&rt->dst, 0)) {
260252
flow_offload_teardown(flow);
261253
return NF_ACCEPT;
262254
}
@@ -476,7 +468,7 @@ nf_flow_offload_ipv6_hook(void *priv, struct sk_buff *skb,
476468

477469
flow_offload_refresh(flow_table, flow);
478470

479-
if (nf_flow_offload_dst_check(&rt->dst)) {
471+
if (!dst_check(&rt->dst, 0)) {
480472
flow_offload_teardown(flow);
481473
return NF_ACCEPT;
482474
}

0 commit comments

Comments
 (0)