This commit is contained in:
Alexey
2026-06-12 00:01:01 +03:00
parent c86dc2f65e
commit eeff16c3fd
+7 -2
View File
@@ -109,7 +109,9 @@ pub(crate) async fn reconcile_synlimit_rules(cfg: &ProxyConfig) {
return; return;
} }
if !has_cap_net_admin() { if !has_cap_net_admin() {
warn!("SYN limiter configured but CAP_NET_ADMIN is not available; netfilter rules not applied"); warn!(
"SYN limiter configured but CAP_NET_ADMIN is not available; netfilter rules not applied"
);
return; return;
} }
@@ -519,7 +521,10 @@ fn clear_iptables_synlimit_rules_for_binary_sync(binary: &str) {
return; return;
} }
for _ in 0..8 { for _ in 0..8 {
if !run_command_sync(binary, &["-t", "filter", "-D", "INPUT", "-j", IPTABLES_CHAIN]) { if !run_command_sync(
binary,
&["-t", "filter", "-D", "INPUT", "-j", IPTABLES_CHAIN],
) {
break; break;
} }
} }