From 9d34c488251c0d5111b4a3c880f2291548645db3 Mon Sep 17 00:00:00 2001 From: aapostoliuk Date: Fri, 22 Mar 2024 16:10:59 +0200 Subject: T6150: Fixed setting a static IP address by Radius in IPoE Fixed setting a static IP address by Radius in IPoE Allowing using named pools by default Allowed adding 'gateway-address' without named pool. --- data/templates/accel-ppp/ipoe.config.tmpl | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'data/templates/accel-ppp/ipoe.config.tmpl') diff --git a/data/templates/accel-ppp/ipoe.config.tmpl b/data/templates/accel-ppp/ipoe.config.tmpl index 0599b5501..976cddd52 100644 --- a/data/templates/accel-ppp/ipoe.config.tmpl +++ b/data/templates/accel-ppp/ipoe.config.tmpl @@ -32,20 +32,29 @@ interface={{ ifname }},shared={{ interface.shared }},mode={{ interface.mode }},i {% endfor %} {% if auth_mode == 'noauth' %} noauth=1 -{% if client_named_ip_pool %} -{% for pool in client_named_ip_pool %} -{% if pool.subnet is defined %} -ip-pool={{ pool.name }} -{% endif %} -{% if pool.gateway_address is defined %} -gw-ip-address={{ pool.gateway_address }}/{{ pool.subnet.split('/')[1] }} -{% endif %} -{% endfor%} -{% endif %} {% elif auth_mode == 'local' %} username=ifname password=csid +{% elif auth_mode == 'radius' %} +attr-dhcp-client-ip=Framed-IP-Address +attr-dhcp-mask=Framed-IP-Netmask +{% endif %} +{% if gateway_address %} +{% for gw in gateway_address %} +gw-ip-address={{ gw }} +{% endfor %} +{% endif %} +{% if client_named_ip_pool %} +{% for pool in client_named_ip_pool %} +{% if pool.subnet is defined %} +ip-pool={{ pool.name }} +{% endif %} +{% if pool.gateway_address is defined %} +gw-ip-address={{ pool.gateway_address }}/{{ pool.subnet.split('/')[1] }} +{% endif %} +{% endfor%} {% endif %} + proxy-arp=1 {% for interface in interfaces %} -- cgit v1.2.3