diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 26b6a0f..6cb5eb4 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -578,7 +578,8 @@ net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 87380 16777216 EOF if modprobe -q tcp_bbr \ - && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then + && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V \ + && [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then cat >> /etc/sysctl.conf <<'EOF' net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr diff --git a/vpnsetup_ubuntu.sh b/vpnsetup_ubuntu.sh index 75f8afe..a8eea7c 100755 --- a/vpnsetup_ubuntu.sh +++ b/vpnsetup_ubuntu.sh @@ -559,7 +559,8 @@ net.ipv4.tcp_rmem = 4096 87380 16777216 net.ipv4.tcp_wmem = 4096 87380 16777216 EOF if modprobe -q tcp_bbr \ - && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V; then + && printf '%s\n%s' "4.20" "$(uname -r)" | sort -C -V \ + && [ -f /proc/sys/net/ipv4/tcp_congestion_control ]; then cat >> /etc/sysctl.conf <<'EOF' net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr