Fix 'all' option for mss clamp

master
Brie Bruns 2015-04-09 15:35:54 -06:00
parent dcb0e19acc
commit 52e74f4b3f
1 changed files with 4 additions and 3 deletions

View File

@ -175,8 +175,9 @@ function enable_mss_clamp {
while read -r interface mss type msssize; do while read -r interface mss type msssize; do
[[ ${interface} = \#* ]] && continue [[ ${interface} = \#* ]] && continue
[[ ${interface} = "" ]] && continue [[ ${interface} = "" ]] && continue
[[ -z ${mss} ]] && mss="-" #[[ -z ${mss} ]] && mss="-"
[[ ${mss} == "-" ]] && mss="1400:1536" [[ ${mss} != "-" ]] && mss="--mss ${mss}"
[[ ${mss} == "-" ]] && mss=""
[[ -z ${type} ]] && type="-" [[ -z ${type} ]] && type="-"
[[ ${type} == "-" ]] && type="${OutFilter}" [[ ${type} == "-" ]] && type="${OutFilter}"
[[ ${type} == "out" ]] && type="${OutFilter}" [[ ${type} == "out" ]] && type="${OutFilter}"
@ -188,7 +189,7 @@ function enable_mss_clamp {
[[ ${interface} == "all" ]] && interface="" [[ ${interface} == "all" ]] && interface=""
${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 \
${interface} -m tcpmss --mss ${mss} ${msssize} ${interface} -m tcpmss ${mss} ${msssize}
unset interface mss type msssize unset interface mss type msssize
done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf"