Some fixes for mss clamping

master
Brie Bruns 2015-05-29 11:45:05 -06:00
parent 9359020bac
commit 7e4cac96fa
1 changed files with 3 additions and 2 deletions

View File

@ -175,6 +175,7 @@ function enable_mss_clamp {
while read -r interface mss type msssize; do
[[ ${interface} = \#* ]] && continue
[[ ${interface} = "" ]] && continue
[[ ${interface} == "all" ]] && isallinterfaces="yes"
#[[ -z ${mss} ]] && mss="-"
[[ ${mss} != "-" ]] && mss="-m tcpmss --mss ${mss}"
[[ ${mss} == "-" ]] && mss=""
@ -189,11 +190,11 @@ function enable_mss_clamp {
#[[ ${interface} != "all" ]] && interface="-o ${interface}"
[[ ${type} == "${InFilter}" ]] && interface="-i ${interface}"
[[ ${type} == "${OutFilter}" ]] && interface="-o ${interface}"
[[ ${interface} == "all" ]] && interface=""
[[ ${isallinterfaces} == "yes" ]] && interface=""
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Read: ${interface} ${mss} ${type} ${msssize}"
${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \
${interface} ${mss} ${msssize}
unset interface mss type msssize
unset interface mss type msssize isallinterfaces
done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf"
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} done"