summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/conf_mode/nat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/nat.py b/src/conf_mode/nat.py
index 056351986..db02ca66f 100755
--- a/src/conf_mode/nat.py
+++ b/src/conf_mode/nat.py
@@ -151,7 +151,7 @@ def verify(nat):
elif 'name' in config['outbound_interface']:
interface_name = config['outbound_interface']['name']
if interface_name not in 'any':
- if interface_name[0] == '!':
+ if interface_name.startswith('!'):
interface_name = interface_name[1:]
if interface_name not in interfaces():
Warning(f'NAT interface "{interface_name}" for source NAT rule "{rule}" does not exist!')
@@ -188,7 +188,7 @@ def verify(nat):
elif 'name' in config['inbound_interface']:
interface_name = config['inbound_interface']['name']
if interface_name not in 'any':
- if interface_name[0] == '!':
+ if interface_name.startswith('!'):
interface_name = interface_name[1:]
if interface_name not in interfaces():
Warning(f'NAT interface "{interface_name}" for destination NAT rule "{rule}" does not exist!')