fix: friendlier error when nft lacks permissions
All checks were successful
Dev / docker (push) Successful in 2m12s
All checks were successful
Dev / docker (push) Successful in 2m12s
This commit is contained in:
parent
49b2bd9083
commit
f608c542d1
1 changed files with 2 additions and 2 deletions
|
|
@ -231,8 +231,8 @@ async def get_ruleset() -> str:
|
||||||
"""Dump the current nftables ruleset for troubleshooting."""
|
"""Dump the current nftables ruleset for troubleshooting."""
|
||||||
try:
|
try:
|
||||||
return await _nft("list ruleset")
|
return await _nft("list ruleset")
|
||||||
except RuntimeError as e:
|
except RuntimeError:
|
||||||
return f"Error: {e}"
|
return "nftables is not available.\n\nThis requires root/NET_ADMIN privileges (production container)."
|
||||||
|
|
||||||
|
|
||||||
def _user_chain_name(user_id: str) -> str:
|
def _user_chain_name(user_id: str) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue