summaryrefslogtreecommitdiff
path: root/python/vyos/template.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-23 11:30:36 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-23 11:45:12 +0100
commit4cba45c00c7d31bf71a6fb4b3cf9fabea4bb285a (patch)
treef7e5f8ddd11841f5695fc0f72027870838ed37bb /python/vyos/template.py
parentc61636c80017e7fd8b9bb20b0f0014de7b4eb8d7 (diff)
downloadvyos-1x-4cba45c00c7d31bf71a6fb4b3cf9fabea4bb285a.tar.gz
vyos-1x-4cba45c00c7d31bf71a6fb4b3cf9fabea4bb285a.zip
vyos.template: fix is_ipv6 Jinja2 filter
Commit 6962bc53 ("vyos.template: provide general is_ip(v4|v6) helpers") introduced new Jinja2 template filters, but the one for checking an address if it is an IPv6 address was broken as it was yet unused.
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r--python/vyos/template.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 58ba75972..7860b581f 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -154,7 +154,7 @@ def is_ipv4(text):
try: return ip_interface(text).version == 4
except: return False
-@register_filter('ipv6')
+@register_filter('is_ipv6')
def is_ipv6(text):
""" Filter IP address, return True on IPv6 address, False otherwise """
from ipaddress import ip_interface