Browse Source

Some fixes for mss clamping

tags/2.1
Brielle Bruns 5 years ago
parent
commit
9359020bac
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      lib/iptables.inc

+ 5
- 2
lib/iptables.inc 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 \


Loading…
Cancel
Save