summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorjack9603301 <jack9603301@163.com>2021-01-24 13:18:24 +0800
committerjack9603301 <jack9603301@163.com>2021-01-24 13:41:17 +0800
commit41b4f00972917ea950842d53eaede0a4308bc663 (patch)
treeb5ffaf3067087fa981da76791aff6e65ce7d386f /src/conf_mode
parentaf91cdbf23157f7b6b7696de9bc27dafca6d7dee (diff)
downloadvyos-1x-41b4f00972917ea950842d53eaede0a4308bc663.tar.gz
vyos-1x-41b4f00972917ea950842d53eaede0a4308bc663.zip
nptv6: T2518: Delete redundant blank lines
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/nat66.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/conf_mode/nat66.py b/src/conf_mode/nat66.py
index f58db04e0..b90939a2f 100755
--- a/src/conf_mode/nat66.py
+++ b/src/conf_mode/nat66.py
@@ -80,19 +80,16 @@ def get_config(config=None):
if not conf.exists(base):
nat['helper_functions'] = 'remove'
-
nat['pre_ct_conntrack'] = get_handler(condensed_json, 'PREROUTING', 'NAT_CONNTRACK')
nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT','NAT_CONNTRACK')
-
nat['deleted'] = ''
-
return nat
# check if NAT66 connection tracking helpers need to be set up - this has to
# be done only once
if not get_handler(condensed_json, 'PREROUTING', 'NAT_CONNTRACK'):
nat['helper_functions'] = 'add'
-
+
# Retrieve current table handler positions
nat['pre_ct_conntrack'] = get_handler(condensed_json, 'PREROUTING', 'VYATTA_CT_PREROUTING_HOOK')
nat['out_ct_conntrack'] = get_handler(condensed_json, 'OUTPUT','VYATTA_CT_OUTPUT_HOOK')
@@ -120,18 +117,16 @@ def verify(nat):
if config['outbound_interface'] not in interfaces():
print(f'WARNING: rule "{rule}" interface "{config["outbound_interface"]}" does not exist on this system')
-
prefix = dict_search('translation.prefix', config)
if prefix != None:
if not is_ipv6(prefix):
raise ConfigError(f'Warning: IPv6 prefix {prefix} is not a valid address prefix')
-
+
prefix = dict_search('source.prefix', config)
if prefix != None:
if not is_ipv6(prefix):
raise ConfigError(f'{err_msg} source-prefix not specified')
-
if dict_search('destination.rule', nat):
for rule, config in dict_search('destination.rule', nat).items():
err_msg = f'Destination NAT66 configuration error in rule {rule}:'