master
parent
f05113eb22
commit
56f460fede
|
@ -164,15 +164,17 @@ function enable_mss_clamp {
|
||||||
esac
|
esac
|
||||||
${debug} ${DebugColor} "${FUNCNAME}: loading"
|
${debug} ${DebugColor} "${FUNCNAME}: loading"
|
||||||
if [ -e "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" ]; then
|
if [ -e "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf" ]; then
|
||||||
while read -r interface mss type; do
|
${debug} ${DebugColor} "${FUNCNAME}: read ${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf successful"
|
||||||
[[ ${interface} = \#* ]] && continue
|
while read -r interface mss type; do
|
||||||
[ ${mss} == "-" ] && mss="1400:1536"
|
[[ ${interface} = \#* ]] && continue
|
||||||
[ ${type} == "-" ] && type="${OutFilter}"
|
[[ ${mss} == "-" ]] && mss="1400:1536"
|
||||||
[ ${type} == "out" ] && type="${OutFilter}"
|
[[ ${type} == "-" ]] && type="${OutFilter}"
|
||||||
[ ${type} == "fwd" ] && type="${FwdFilter}"
|
[[ ${type} == "out" ]] && type="${OutFilter}"
|
||||||
${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \
|
[[ ${type} == "fwd" ]] && type="${FwdFilter}"
|
||||||
|
${debug} ${DebugColor} "${FUNCNAME}: Read: ${interface} ${mss} ${type}"
|
||||||
|
${VER_IPTABLES} -A ${type} -p tcp --tcp-flags SYN,RST SYN -j TCPMSS \
|
||||||
--clamp-mss-to-pmtu -o $i -m tcpmss --mss ${mss}
|
--clamp-mss-to-pmtu -o $i -m tcpmss --mss ${mss}
|
||||||
done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf"
|
done < "${FWCONFIGDIR}/ipv${IPVER}/mss-clamp.conf"
|
||||||
|
|
||||||
${debug} ${DebugColor} "${FUNCNAME}: done"
|
${debug} ${DebugColor} "${FUNCNAME}: done"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue