summaryrefslogtreecommitdiff
path: root/src/conf_mode/nat.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-01 10:53:11 +0100
committerChristian Poessinger <christian@poessinger.com>2022-01-01 10:53:11 +0100
commit901e40dc3b52fb3d8dc7308f54da42b858b61798 (patch)
tree0363bfabd6f441bc7e48b63c267a7123ef50bc40 /src/conf_mode/nat.py
parent0091f6080181cc3836d70589d9a2f4a1c1cb11a8 (diff)
downloadvyos-1x-901e40dc3b52fb3d8dc7308f54da42b858b61798.tar.gz
vyos-1x-901e40dc3b52fb3d8dc7308f54da42b858b61798.zip
nat: T2199: rename iptables -> nftables variable prefix
Diffstat (limited to 'src/conf_mode/nat.py')
-rwxr-xr-xsrc/conf_mode/nat.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py
index 62fb9abad..96f8f6fb6 100755
--- a/src/conf_mode/nat.py
+++ b/src/conf_mode/nat.py
@@ -42,7 +42,7 @@ if LooseVersion(kernel_version()) > LooseVersion('5.1'):
else:
k_mod = ['nft_nat', 'nft_chain_nat_ipv4']
-iptables_nat_config = '/tmp/vyos-nat-rules.nft'
+nftables_nat_config = '/tmp/vyos-nat-rules.nft'
def get_handler(json, chain, target):
""" Get nftable rule handler number of given chain/target combination.
@@ -179,14 +179,14 @@ def verify(nat):
return None
def generate(nat):
- render(iptables_nat_config, 'firewall/nftables-nat.tmpl', nat,
+ render(nftables_nat_config, 'firewall/nftables-nat.tmpl', nat,
permission=0o755)
return None
def apply(nat):
- cmd(f'{iptables_nat_config}')
- if os.path.isfile(iptables_nat_config):
- os.unlink(iptables_nat_config)
+ cmd(f'{nftables_nat_config}')
+ if os.path.isfile(nftables_nat_config):
+ os.unlink(nftables_nat_config)
return None