summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-13 17:38:16 +0100
committerGitHub <noreply@github.com>2023-02-13 17:38:16 +0100
commit5e56daaff4ec53a387abbd3ad879e916a2bfa373 (patch)
tree3a9a3d1823e01287c52a38cc67c0b7061bc901ce /data/templates/accel-ppp
parent9c481b00cae8ed1d121c809fb5edc24a937525e9 (diff)
parente7e81746e6ad01ce644cd7b584233464f91d9380 (diff)
downloadvyos-1x-5e56daaff4ec53a387abbd3ad879e916a2bfa373.tar.gz
vyos-1x-5e56daaff4ec53a387abbd3ad879e916a2bfa373.zip
Merge pull request #1813 from sever-sever/T4971-eq
T4971: PPPoE server add named ip pool and attr Framed-Pool
Diffstat (limited to 'data/templates/accel-ppp')
-rw-r--r--data/templates/accel-ppp/config_ip_pool.j210
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl15
2 files changed, 25 insertions, 0 deletions
diff --git a/data/templates/accel-ppp/config_ip_pool.j2 b/data/templates/accel-ppp/config_ip_pool.j2
index 3b0f68084..f61a4f148 100644
--- a/data/templates/accel-ppp/config_ip_pool.j2
+++ b/data/templates/accel-ppp/config_ip_pool.j2
@@ -11,4 +11,14 @@ gw-ip-address={{ gateway_address }}
{{ subnet }}
{% endfor %}
{% endif %}
+{% if client_ip_pool.name is defined and client_ip_pool.name is not none %}
+{% for pool, pool_config in client_ip_pool.name.items() %}
+{% if pool_config.subnet is defined and pool_config.subnet is not none %}
+{{ pool_config.subnet }},name={{ pool }}
+{% endif %}
+{% if pool_config.gateway_address is defined and pool_config.gateway_address is not none %}
+gw-ip-address={{ pool_config.gateway_address }}
+{% endif %}
+{% endfor %}
+{% endif %}
{% endif %}
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index 46f462166..b37004f5b 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -136,6 +136,21 @@ pado-delay={{ pado_delay_param.value }}
called-sid={{ authentication.radius.called_sid_format }}
{% endif %}
+{% if authentication is defined and authentication.mode is defined and authentication.mode == 'local' %}
+{% if client_ip_pool is defined and client_ip_pool is not none %}
+{% if client_ip_pool.name is defined and client_ip_pool.name is not none %}
+{% for pool, pool_config in client_ip_pool.name.items() %}
+{% if pool_config.subnet is defined and pool_config.subnet is not none %}
+ip-pool={{ pool }}
+{% if pool_config.gateway_address is defined and pool_config.gateway_address is not none %}
+gw-ip-address={{ pool_config.gateway_address }}/{{ pool_config.subnet.split('/')[1] }}
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endif %}
+{% endif %}
+
{% if limits is defined %}
[connlimit]
{% if limits.connection_limit is defined and limits.connection_limit is not none %}