mirror of
https://github.com/telemt/telemt.git
synced 2026-06-19 02:00:08 +07:00
Rustfmt
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user