summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2022-01-29 13:18:28 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2022-01-29 22:56:28 +0100
commited67750b94e8bc779ec0e2cf6d568a3f7292de13 (patch)
tree73450aca20e9706b96d5574c758823d9e9ccb531 /src/op_mode
parent0a0d4abc02da89f68d453495ec002d2afecfca7b (diff)
downloadvyos-1x-ed67750b94e8bc779ec0e2cf6d568a3f7292de13.tar.gz
vyos-1x-ed67750b94e8bc779ec0e2cf6d568a3f7292de13.zip
firewall: T4218: Adds a prefix to all user defined chains
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/firewall.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/op_mode/firewall.py b/src/op_mode/firewall.py
index b6bb5b802..3146fc357 100755
--- a/src/op_mode/firewall.py
+++ b/src/op_mode/firewall.py
@@ -88,7 +88,8 @@ def get_config_firewall(conf, name=None, ipv6=False, interfaces=True):
def get_nftables_details(name, ipv6=False):
suffix = '6' if ipv6 else ''
- command = f'sudo nft list chain ip{suffix} filter {name}'
+ name_prefix = 'NAME6_' if ipv6 else 'NAME_'
+ command = f'sudo nft list chain ip{suffix} filter {name_prefix}{name}'
try:
results = cmd(command)
except: