]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-translate: add test file for TCPMSS extension
authorAastha Gupta <aastha.gupta4104@gmail.com>
Mon, 16 Oct 2017 21:02:09 +0000 (02:32 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 17 Oct 2017 11:36:09 +0000 (13:36 +0200)
This adds test file for the recently added TCPMSS extension.

Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_TCPMSS.txlate [new file with mode: 0644]

diff --git a/extensions/libxt_TCPMSS.txlate b/extensions/libxt_TCPMSS.txlate
new file mode 100644 (file)
index 0000000..6a64d2c
--- /dev/null
@@ -0,0 +1,5 @@
+iptables-translate -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
+nft add rule ip filter FORWARD tcp flags & (syn|rst) == syn counter tcp option maxseg size set rt mtu
+
+iptables-translate -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --set-mss 90
+nft add rule ip filter FORWARD tcp flags & (syn|rst) == syn counter tcp option maxseg size set 90