From 52a82ce3dd901a1536c7d7d9d963e9c2d761c816 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Thu, 1 Nov 2018 17:57:55 +0100 Subject: kernel: Copy patches from kernel 4.14 to 4.19 This just copies the files from the kernel 4.14 specific folders into the kernel 4.19 specific folder, no changes are done to the files in this commit. Signed-off-by: Hauke Mehrtens --- .../613-netfilter_optional_tcp_window_check.patch | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch (limited to 'target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch') diff --git a/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch new file mode 100644 index 0000000000..69c165bb41 --- /dev/null +++ b/target/linux/generic/pending-4.19/613-netfilter_optional_tcp_window_check.patch @@ -0,0 +1,44 @@ +From: Felix Fietkau +Subject: netfilter: optional tcp window check + +Signed-off-by: Felix Fietkau +--- + net/netfilter/nf_conntrack_proto_tcp.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/net/netfilter/nf_conntrack_proto_tcp.c ++++ b/net/netfilter/nf_conntrack_proto_tcp.c +@@ -33,6 +33,9 @@ + #include + #include + ++/* Do not check the TCP window for incoming packets */ ++static int nf_ct_tcp_no_window_check __read_mostly = 1; ++ + /* "Be conservative in what you do, + be liberal in what you accept from others." + If it's non-zero, we mark only out of window RST segments as INVALID. */ +@@ -508,6 +511,9 @@ static bool tcp_in_window(const struct n + s32 receiver_offset; + bool res, in_recv_win; + ++ if (nf_ct_tcp_no_window_check) ++ return true; ++ + /* + * Get the required data from the packet. + */ +@@ -1489,6 +1495,13 @@ static struct ctl_table tcp_sysctl_table + .mode = 0644, + .proc_handler = proc_dointvec, + }, ++ { ++ .procname = "nf_conntrack_tcp_no_window_check", ++ .data = &nf_ct_tcp_no_window_check, ++ .maxlen = sizeof(unsigned int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec, ++ }, + { } + }; + #endif /* CONFIG_SYSCTL */ -- cgit v1.2.3