Some fixes for mss clamping

master
Brie Bruns 2015-05-29 11:37:20 -06:00
parent c01a1b62e3
commit 9359020bac
1 changed files with 5 additions and 2 deletions

View File

@ -179,13 +179,16 @@ function enable_mss_clamp {
[[ ${mss} != "-" ]] && mss="-m tcpmss --mss ${mss}"
[[ ${mss} == "-" ]] && mss=""
[[ -z ${type} ]] && type="-"
[[ ${type} == "-" ]] && type="${OutFilter}"
[[ ${type} == "-" ]] && type="out"
[[ ${type} == "out" ]] && type="${OutFilter}"
[[ ${type} == "fwd" ]] && type="${FwdFilter}"
[[ ${type} == "in" ]] && type="${InFilter}"
[[ -z ${msssize} ]] && msssize="-"
[[ ${msssize} != "-" ]] && msssize="--set-mss ${msssize}"
[[ ${msssize} == "-" ]] && msssize="--clamp-mss-to-pmtu"
[[ ${interface} != "all" ]] && interface="-o ${interface}"
#[[ ${interface} != "all" ]] && interface="-o ${interface}"
[[ ${type} == "${InFilter}" ]] && interface="-i ${interface}"
[[ ${type} == "${OutFilter}" ]] && interface="-o ${interface}"
[[ ${interface} == "all" ]] && interface=""
${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Read: ${interface} ${mss} ${type} ${msssize}"
${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \