From a2cd4ae4cf5552d8ceeb29dcea265c43fc826f53 Mon Sep 17 00:00:00 2001
From: Christian Poessinger <christian@poessinger.com>
Date: Sun, 20 Nov 2022 07:37:22 +0100
Subject: 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.
---
 python/vyos/nat.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'python/vyos')

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 = []
-- 
cgit v1.2.3