diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2020-07-26 22:34:49 +0800 |
---|---|---|
committer | Yousong Zhou <yszhou4tech@gmail.com> | 2020-07-26 22:34:49 +0800 |
commit | 7bd437cc9f4943e7769b9494b73e86a14373c916 (patch) | |
tree | d25686a46e980f096efa7f0cc94ef8e64c4baeb2 /package/network/config/firewall/patches | |
parent | 2ba95d287e1fcfbff782de5e5cebfc5d49edbc7c (diff) | |
download | upstream-7bd437cc9f4943e7769b9494b73e86a14373c916.tar.gz upstream-7bd437cc9f4943e7769b9494b73e86a14373c916.tar.bz2 upstream-7bd437cc9f4943e7769b9494b73e86a14373c916.zip |
firewall: backport patch for mss clamping in both directions
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/network/config/firewall/patches')
-rw-r--r-- | package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch b/package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch new file mode 100644 index 0000000000..816bca35d0 --- /dev/null +++ b/package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch @@ -0,0 +1,33 @@ +From c9f48cb3bd0e14fec8ad71c3baef7c280a390b4f Mon Sep 17 00:00:00 2001 +From: Yousong Zhou <yszhou4tech@gmail.com> +Date: Fri, 24 Jul 2020 12:52:59 +0800 +Subject: [PATCH] zones: apply tcp mss clamping also on ingress path + +Fixes FS#3231 + +Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> +Acked-by: Jo-Philipp Wich <jo@mein.io> +(cherry picked from commit e9b90dfac2225927c035f6a76277b850c282dc9a) +--- + zones.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/zones.c b/zones.c +index 505ab20..4656f88 100644 +--- a/zones.c ++++ b/zones.c +@@ -553,6 +553,14 @@ print_interface_rule(struct fw3_ipt_handle *handle, struct fw3_state *state, + fw3_ipt_rule_target(r, "TCPMSS"); + fw3_ipt_rule_addarg(r, false, "--clamp-mss-to-pmtu", NULL); + fw3_ipt_rule_replace(r, "FORWARD"); ++ ++ r = fw3_ipt_rule_create(handle, &tcp, dev, NULL, sub, NULL); ++ fw3_ipt_rule_addarg(r, false, "--tcp-flags", "SYN,RST"); ++ fw3_ipt_rule_addarg(r, false, "SYN", NULL); ++ fw3_ipt_rule_comment(r, "Zone %s MTU fixing", zone->name); ++ fw3_ipt_rule_target(r, "TCPMSS"); ++ fw3_ipt_rule_addarg(r, false, "--clamp-mss-to-pmtu", NULL); ++ fw3_ipt_rule_replace(r, "FORWARD"); + } + } + else if (handle->table == FW3_TABLE_RAW) |