diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-21 02:05:30 +0200 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-09-21 20:53:49 +0200 |
commit | c6bbe051574acf5ca1501e631d73ac06bdb17b30 (patch) | |
tree | 3a10a0d4d58a2edb8b50e65d45f61b7574dd82af /src | |
parent | e6ba98a85ca72abc7e7e2001d208bcd1806c2c13 (diff) | |
download | vyos-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-x | src/conf_mode/nat.py | 4 |
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 |