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