From 56f460fedee62e35c303d81e8c1e395b5a66198b Mon Sep 17 00:00:00 2001 From: "bbruns@gmail.com" Date: Sun, 30 Mar 2014 18:32:52 +0000 Subject: [PATCH] --- etc/ipv4/mss-clamp.conf | 2 +- etc/ipv6/mss-clamp.conf | 2 +- lib/iptables.inc | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/etc/ipv4/mss-clamp.conf b/etc/ipv4/mss-clamp.conf index 471035e..c226a23 100644 --- a/etc/ipv4/mss-clamp.conf +++ b/etc/ipv4/mss-clamp.conf @@ -10,4 +10,4 @@ # Interface is required. # # interface mss size type -eth0 - - \ No newline at end of file +eth0 - - diff --git a/etc/ipv6/mss-clamp.conf b/etc/ipv6/mss-clamp.conf index 471035e..c226a23 100644 --- a/etc/ipv6/mss-clamp.conf +++ b/etc/ipv6/mss-clamp.conf @@ -10,4 +10,4 @@ # Interface is required. # # interface mss size type -eth0 - - \ No newline at end of file +eth0 - - diff --git a/lib/iptables.inc b/lib/iptables.inc index 68d82e3..1d7791d 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -164,15 +164,17 @@ function enable_mss_clamp { esac ${debug} ${DebugColor} "${FUNCNAME}: loading" if [ -e "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" ]; then - while read -r interface mss type; do - [[ ${interface} = \#* ]] && continue - [ ${mss} == "-" ] && mss="1400:1536" - [ ${type} == "-" ] && type="${OutFilter}" - [ ${type} == "out" ] && type="${OutFilter}" - [ ${type} == "fwd" ] && type="${FwdFilter}" - ${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \ + ${debug} ${DebugColor} "${FUNCNAME}: read ${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf successful" + while read -r interface mss type; do + [[ ${interface} = \#* ]] && continue + [[ ${mss} == "-" ]] && mss="1400:1536" + [[ ${type} == "-" ]] && type="${OutFilter}" + [[ ${type} == "out" ]] && type="${OutFilter}" + [[ ${type} == "fwd" ]] && type="${FwdFilter}" + ${debug} ${DebugColor} "${FUNCNAME}: Read: ${interface} ${mss} ${type}" + ${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \ --clamp-mss-to-pmtu -o $i -m tcpmss --mss ${mss} - done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" + done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" ${debug} ${DebugColor} "${FUNCNAME}: done" else