diff --git a/lib/iptables.inc b/lib/iptables.inc index 4d270db..e2f7d9d 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -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 \