summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-11-20 07:37:22 +0100
committerChristian Poessinger <christian@poessinger.com>2022-11-20 07:37:24 +0100
commita2cd4ae4cf5552d8ceeb29dcea265c43fc826f53 (patch)
tree152af6a776fbb45c4a1a2a1c80de0361a9d86e8b
parent2fa43aea9c47968754ff7e870f798dbc8b1ed664 (diff)
downloadvyos-1x-a2cd4ae4cf5552d8ceeb29dcea265c43fc826f53.tar.gz
vyos-1x-a2cd4ae4cf5552d8ceeb29dcea265c43fc826f53.zip
T4830: nat66: remove external IPv6 check on bracketize_ipv6()
vyos.template.bracketize_ipv6() has a build-in check if the supplied address is of IPv6 AFI. No need to code an external check arround that.
-rw-r--r--python/vyos/nat.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/vyos/nat.py b/python/vyos/nat.py
index e1dfff541..8a311045a 100644
--- a/python/vyos/nat.py
+++ b/python/vyos/nat.py
@@ -71,8 +71,7 @@ def parse_nat_rule(rule_conf, rule_id, nat_type, ipv6=False):
else:
translation_output.append('to')
if addr:
- if ipv6:
- addr = bracketize_ipv6(addr)
+ addr = bracketize_ipv6(addr)
translation_output.append(addr)
options = []