diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-05-08 09:40:43 +0200 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-05-08 09:42:07 +0200 |
commit | f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3 (patch) | |
tree | 36fd6f2cc4324384f9af19994fb69a20d95f8daf /target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch | |
parent | 004cc22e4ef8187dd80d5d6be5a2575453ef3699 (diff) | |
download | upstream-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.tar.gz upstream-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.tar.bz2 upstream-f9dcdc7fefcab5ec9b15b0f3c87dfebef37ecaa3.zip |
kernel: mark source kernel for netfilter backports
This helps keeping track on patches & adding new kernels in the future.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch')
-rw-r--r-- | target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch b/target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch new file mode 100644 index 0000000000..4ee5532438 --- /dev/null +++ b/target/linux/generic/backport-4.14/354-v4.18-netfilter-nf_flow_table-move-ip-header-check-out-of-.patch @@ -0,0 +1,32 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Sat, 17 Feb 2018 11:51:20 +0100 +Subject: [PATCH] netfilter: nf_flow_table: move ip header check out of + nf_flow_exceeds_mtu + +Allows the function to be shared with the IPv6 hook code + +Signed-off-by: Felix Fietkau <nbd@nbd.name> +--- + +--- a/net/netfilter/nf_flow_table_ip.c ++++ b/net/netfilter/nf_flow_table_ip.c +@@ -181,9 +181,6 @@ static bool nf_flow_exceeds_mtu(const st + if (skb->len <= mtu) + return false; + +- if ((ip_hdr(skb)->frag_off & htons(IP_DF)) == 0) +- return false; +- + if (skb_is_gso(skb) && skb_gso_validate_mtu(skb, mtu)) + return false; + +@@ -222,7 +219,8 @@ nf_flow_offload_ip_hook(void *priv, stru + flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); + rt = (const struct rtable *)flow->tuplehash[dir].tuple.dst_cache; + +- if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu))) ++ if (unlikely(nf_flow_exceeds_mtu(skb, flow->tuplehash[dir].tuple.mtu)) && ++ (ip_hdr(skb)->frag_off & htons(IP_DF)) != 0) + return NF_ACCEPT; + + if (skb_try_make_writable(skb, sizeof(*iph))) |