Developing lightweight computation at the DSG edge

Commit 27f01f7e authored by p4u's avatar p4u
Browse files

Change the clamp-mss rule for bmx6 from x6+ for bmx+

Adds mss-clamping=1 to the openwrt firewall configuration
parent eef846ad
......@@ -131,6 +131,7 @@ qmp_gw_masq_wan() {
qmp_uci_set_cfg firewall.$cfg.forward=ACCEPT
qmp_uci_set_cfg firewall.$cfg.name=wan
qmp_uci_set_cfg firewall.$cfg.masq=$masq
qmp_uci_set_cfg firewall.$cfg.mtu_fix=1
qmp_uci_commit firewall
else
......@@ -139,6 +140,7 @@ qmp_gw_masq_wan() {
qmp_uci_set_raw firewall.@zone[$wan].output=ACCEPT
qmp_uci_set_raw firewall.@zone[$wan].forward=ACCEPT
qmp_uci_set_raw firewall.@zone[$wan].masq=$masq
qmp_uci_set_raw firewall.$cfg.mtu_fix=1
cfg=@zone[$wan]
fi
......
......@@ -24,11 +24,11 @@
#
# Update the clamp MSS TCP rule to new interface name of bmx6 with tunnels on-demand.
sed -i -e "s/^iptables -A FORWARD -p tcp -o bmx6_+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu$/iptables -A FORWARD -p tcp -o x6+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu/g" /etc/firewall.user
sed -i -e "s/^iptables -A FORWARD -p tcp -o bmx6_+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu$/iptables -A FORWARD -p tcp -o bmx+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu/g" /etc/firewall.user
if grep -q -e "^# Clamp MSS TCP rule to fix MTU problems" /etc/firewall.user; then exit 0; fi
cat << EOF >> /etc/firewall.user
# Clamp MSS TCP rule to fix MTU problems
iptables -A FORWARD -p tcp -o x6+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables -A FORWARD -p tcp -o bmx+ -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
EOF
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment