summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-05-21 13:24:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-10 09:52:20 +0200
commitfa84c445fba40500c4154ce7ba5476099558e6b2 (patch)
treee625c2402a8f95d1cb3bb19faa864005078a5c2f /net
parent50c5095a4db998c8c268c3edead147bb4857d4b9 (diff)
downloadlinux-stable-fa84c445fba40500c4154ce7ba5476099558e6b2.tar.gz
linux-stable-fa84c445fba40500c4154ce7ba5476099558e6b2.tar.bz2
linux-stable-fa84c445fba40500c4154ce7ba5476099558e6b2.zip
netfilter: nf_flow_table: ignore DF bit setting
commit e75b3e1c9bc5b997d09bdf8eb72ab3dd3c1a7072 upstream. Its irrelevant if the DF bit is set or not, we must pass packet to stack in either case. If the DF bit is set, we must pass it to stack so the appropriate ICMP error can be generated. If the DF is not set, we must pass it to stack for fragmentation. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_flow_table_ip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/nf_flow_table_ip.c b/net/netfilter/nf_flow_table_ip.c
index 46022a2867d7..e7c3daddeffc 100644
--- a/net/netfilter/nf_flow_table_ip.c
+++ b/net/netfilter/nf_flow_table_ip.c
@@ -246,8 +246,7 @@ nf_flow_offload_ip_hook(void *priv, struct sk_buff *skb,
flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
rt = (struct rtable *)flow->tuplehash[dir].tuple.dst_cache;
- if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)) &&
- (ip_hdr(skb)->frag_off & htons(IP_DF)) != 0)
+ if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)))
return NF_ACCEPT;
if (skb_try_make_writable(skb, sizeof(*iph)))