diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-06-09 19:03:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 19:03:51 +0200 |
commit | a3559f7e429c86ccdfeeac0aaddfc054be403368 (patch) | |
tree | 819a329fe47e347ee4ad26f2c7fc70d5f9861a5f /data | |
parent | 3586dad839e3db0279d59c467b6f972980ad2f43 (diff) | |
parent | e37cd20355949993988b333bad05b1278f4e3dc0 (diff) | |
download | vyos-1x-a3559f7e429c86ccdfeeac0aaddfc054be403368.tar.gz vyos-1x-a3559f7e429c86ccdfeeac0aaddfc054be403368.zip |
Merge pull request #1271 from sever-sever/T2580-equ
ipoe: T2580: Add pools and gateway options
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/accel-ppp/ipoe.config.tmpl | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.tmpl b/data/templates/accel-ppp/ipoe.config.tmpl index 1cf2ab0be..9fc816a2c 100644 --- a/data/templates/accel-ppp/ipoe.config.tmpl +++ b/data/templates/accel-ppp/ipoe.config.tmpl @@ -24,11 +24,24 @@ level=5 [ipoe] verbose=1 {% for interface in interfaces %} -{% if interface.vlan_mon %} -interface=re:{{ interface.name }}\.\d+,{% else %}interface={{ interface.name }},{% endif %}shared={{ interface.shared }},mode={{ interface.mode }},ifcfg={{ interface.ifcfg }},range={{ interface.range }},start={{ interface.sess_start }},ipv6=1 +{% set ifname = interface.name %} +{% if interface.vlan_mon %} +{% set ifname = 're:' ~ interface.name ~ '\.\d+' %} +{% endif %} +interface={{ ifname }},shared={{ interface.shared }},mode={{ interface.mode }},ifcfg={{ interface.ifcfg }}{{ ',range=' ~ interface.range if interface.range is defined and interface.range is not none }},start={{ interface.sess_start }},ipv6=1 {% 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 @@ -61,6 +74,18 @@ verbose=1 [ipv6-dhcp] verbose=1 +{% if client_named_ip_pool %} +[ip-pool] +{% for pool in client_named_ip_pool %} +{% if pool.subnet is defined %} +{{ pool.subnet }},name={{ pool.name }} +{% endif %} +{% if pool.gateway_address is defined %} +gw-ip-address={{ pool.gateway_address }}/{{ pool.subnet.split('/')[1] }} +{% endif %} +{% endfor%} +{% endif %} + {% if client_ipv6_pool %} [ipv6-pool] {% for p in client_ipv6_pool %} |