aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2020-07-26 18:22:53 +0800
committerYousong Zhou <yszhou4tech@gmail.com>2020-07-26 18:23:26 +0800
commitafaa978b7474b4fc187598866534dee17d56179e (patch)
tree878cca8e079a51d1f3ba7028102ab65a447ffc20 /package/network
parenta2c9fc9ff062df95de65d4d3d05dff48c53554ea (diff)
downloadupstream-afaa978b7474b4fc187598866534dee17d56179e.tar.gz
upstream-afaa978b7474b4fc187598866534dee17d56179e.tar.bz2
upstream-afaa978b7474b4fc187598866534dee17d56179e.zip
firewall: backport patch for mss clamping in both directions
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/config/firewall/Makefile2
-rw-r--r--package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch33
2 files changed, 34 insertions, 1 deletions
diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile
index bf2a1060eb..dcfd849577 100644
--- a/package/network/config/firewall/Makefile
+++ b/package/network/config/firewall/Makefile
@@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
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..9e23dfd2b2
--- /dev/null
+++ b/package/network/config/firewall/patches/0001-zones-apply-tcp-mss-clamping-also-on-ingress-path.patch
@@ -0,0 +1,33 @@
+From 4a7df7d8c4e40fd2ce0d9f125755249dee17a8bd 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 01fb706..3d54a76 100644
+--- a/zones.c
++++ b/zones.c
+@@ -552,6 +552,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)