summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2022-09-21 02:05:30 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2022-09-21 20:53:49 +0200
commitc6bbe051574acf5ca1501e631d73ac06bdb17b30 (patch)
tree3a10a0d4d58a2edb8b50e65d45f61b7574dd82af /src
parente6ba98a85ca72abc7e7e2001d208bcd1806c2c13 (diff)
downloadvyos-1x-c6bbe051574acf5ca1501e631d73ac06bdb17b30.tar.gz
vyos-1x-c6bbe051574acf5ca1501e631d73ac06bdb17b30.zip
nat: T4605: Refactor static NAT to use python module for parsing rules
* Rename table to vyos_nat * Add static NAT smoketest
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/nat.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py
index 3f52d7c1f..8b1a5a720 100755
--- a/src/conf_mode/nat.py
+++ b/src/conf_mode/nat.py
@@ -194,7 +194,9 @@ def generate(nat):
if tmp > 0:
raise ConfigError('Configuration file errors encountered!')
- tmp = run(f'nft -c -f {nftables_nat_config}')
+ tmp = run(f'nft -c -f {nftables_static_nat_conf}')
+ if tmp > 0:
+ raise ConfigError('Configuration file errors encountered!')
return None