Some fixes for mss clamping
parent
c01a1b62e3
commit
9359020bac
|
@ -179,13 +179,16 @@ function enable_mss_clamp {
|
||||||
[[ ${mss} != "-" ]] && mss="-m tcpmss --mss ${mss}"
|
[[ ${mss} != "-" ]] && mss="-m tcpmss --mss ${mss}"
|
||||||
[[ ${mss} == "-" ]] && mss=""
|
[[ ${mss} == "-" ]] && mss=""
|
||||||
[[ -z ${type} ]] && type="-"
|
[[ -z ${type} ]] && type="-"
|
||||||
[[ ${type} == "-" ]] && type="${OutFilter}"
|
[[ ${type} == "-" ]] && type="out"
|
||||||
[[ ${type} == "out" ]] && type="${OutFilter}"
|
[[ ${type} == "out" ]] && type="${OutFilter}"
|
||||||
[[ ${type} == "fwd" ]] && type="${FwdFilter}"
|
[[ ${type} == "fwd" ]] && type="${FwdFilter}"
|
||||||
|
[[ ${type} == "in" ]] && type="${InFilter}"
|
||||||
[[ -z ${msssize} ]] && msssize="-"
|
[[ -z ${msssize} ]] && msssize="-"
|
||||||
[[ ${msssize} != "-" ]] && msssize="--set-mss ${msssize}"
|
[[ ${msssize} != "-" ]] && msssize="--set-mss ${msssize}"
|
||||||
[[ ${msssize} == "-" ]] && msssize="--clamp-mss-to-pmtu"
|
[[ ${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=""
|
[[ ${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 \
|
||||||
|
|
Loading…
Reference in New Issue