master v2.01a1
bbruns@gmail.com 2014-07-27 21:49:13 +00:00
parent 9eb6fde7ff
commit 127230fd38
1 changed files with 2 additions and 2 deletions

View File

@ -182,12 +182,12 @@ function enable_mss_clamp {
[[ ${type} == "out" ]] && type="${OutFilter}" [[ ${type} == "out" ]] && type="${OutFilter}"
[[ ${type} == "fwd" ]] && type="${FwdFilter}" [[ ${type} == "fwd" ]] && type="${FwdFilter}"
[[ -z ${msssize} ]] && msssize="-" [[ -z ${msssize} ]] && msssize="-"
[[ ${msssize} == "-" ]] && msssize="--clamp-mss-to-pmtu"
[[ ${msssize} != "-" ]] && msssize="--set-mss ${msssize}" [[ ${msssize} != "-" ]] && msssize="--set-mss ${msssize}"
[[ ${msssize} == "-" ]] && msssize="--clamp-mss-to-pmtu"
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Read: ${interface} ${mss} ${type} ${msssize}" ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Read: ${interface} ${mss} ${type} ${msssize}"
${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \ ${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \
-o ${interface} -m tcpmss --mss ${mss} ${msssize} -o ${interface} -m tcpmss --mss ${mss} ${msssize}
unset mss msssize interface type unset interface mss type msssize
done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf"
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} done" ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} done"