net/freeradius: Add IPv6 support to client IP and harden loose model (#2301)

* Update Client.xml

* Update clients.conf
This commit is contained in:
Michael
2021-04-10 10:13:30 +02:00
committed by GitHub
parent e89c92145a
commit e856da6018
2 changed files with 6 additions and 2 deletions
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/freeradius/client</mount>
<description>FreeRADIUS client configuration</description>
<version>1.0.0</version>
<version>1.0.1</version>
<items>
<clients>
<client type="ArrayField">
@@ -15,7 +15,7 @@
<secret type="TextField">
<Required>Y</Required>
</secret>
<ip type="TextField">
<ip type="HostnameField">
<Required>N</Required>
</ip>
</client>
@@ -6,7 +6,11 @@
client "{{ client_list.name }}" {
secret = {{ client_list.secret }}
shortname = "{{ client_list.name }}"
{% if ':' in client_list.ip %}
ipv6addr = {{ client_list.ip }}
{% else %}
ipaddr = {{ client_list.ip }}
{% endif %}
}
{% endif %}