Skip to content

Commit cf56aa8

Browse files
committed
Revert "netfilter: flowtable: teardown flow if cached mtu is stale"
This reverts commit b8baac3. IPv4 packets with no DF flag set on result in frequent flow entry teardown cycles, this is visible in the network topology that is used in the nft_flowtable.sh test. nft_flowtable.sh test ocassionally fails reporting that the dscp_fwd test sees no packets going through the flowtable path. Fixes: b8baac3 ("netfilter: flowtable: teardown flow if cached mtu is stale") Reported-by: Jakub Kicinski <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent e589adf commit cf56aa8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

net/netfilter/nf_flow_table_ip.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,8 @@ static int nf_flow_offload_forward(struct nf_flowtable_ctx *ctx,
381381
flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
382382

383383
mtu = flow->tuplehash[dir].tuple.mtu + ctx->offset;
384-
if (unlikely(nf_flow_exceeds_mtu(skb, mtu))) {
385-
flow_offload_teardown(flow);
384+
if (unlikely(nf_flow_exceeds_mtu(skb, mtu)))
386385
return 0;
387-
}
388386

389387
iph = (struct iphdr *)(skb_network_header(skb) + ctx->offset);
390388
thoff = (iph->ihl * 4) + ctx->offset;
@@ -662,10 +660,8 @@ static int nf_flow_offload_ipv6_forward(struct nf_flowtable_ctx *ctx,
662660
flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
663661

664662
mtu = flow->tuplehash[dir].tuple.mtu + ctx->offset;
665-
if (unlikely(nf_flow_exceeds_mtu(skb, mtu))) {
666-
flow_offload_teardown(flow);
663+
if (unlikely(nf_flow_exceeds_mtu(skb, mtu)))
667664
return 0;
668-
}
669665

670666
ip6h = (struct ipv6hdr *)(skb_network_header(skb) + ctx->offset);
671667
thoff = sizeof(*ip6h) + ctx->offset;

0 commit comments

Comments
 (0)