mirror of
https://github.com/telemt/telemt.git
synced 2026-06-28 05:41:11 +03:00
Skip netfilter cleanup without CAP_NET_ADMIN by #845
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
@@ -124,6 +124,10 @@ pub(crate) async fn reconcile_synlimit_rules(cfg: &ProxyConfig) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn clear_synlimit_rules_all_backends() -> Result<(), String> {
|
pub(crate) async fn clear_synlimit_rules_all_backends() -> Result<(), String> {
|
||||||
|
if !has_cap_net_admin() {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
|
||||||
let mut errors = Vec::new();
|
let mut errors = Vec::new();
|
||||||
if let Err(error) = clear_nft_synlimit_rules_all_families().await {
|
if let Err(error) = clear_nft_synlimit_rules_all_families().await {
|
||||||
errors.push(error);
|
errors.push(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user