summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp/pppoe.config.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/accel-ppp/pppoe.config.tmpl')
-rw-r--r--data/templates/accel-ppp/pppoe.config.tmpl23
1 files changed, 20 insertions, 3 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl
index f444af85c..238e7ee15 100644
--- a/data/templates/accel-ppp/pppoe.config.tmpl
+++ b/data/templates/accel-ppp/pppoe.config.tmpl
@@ -17,6 +17,10 @@ net-snmp
{% if limits is defined %}
connlimit
{% endif %}
+{% if extended_scripts is defined %}
+sigchld
+pppd_compat
+{% endif %}
[core]
thread-count={{ thread_count }}
@@ -91,6 +95,9 @@ ipv6-accept-peer-intf-id={{ "1" if ppp_options.ipv6_accept_peer_intf_id is defin
{% endif %}
{# MTU #}
mtu={{ mtu }}
+{% if ppp_options.interface_cache is defined and ppp_options.interface_cache is not none %}
+unit-cache={{ ppp_options.interface_cache }}
+{% endif %}
[pppoe]
verbose=1
@@ -133,6 +140,9 @@ service-name={{ service_name | join(',') }}
{% endfor %}
pado-delay={{ pado_delay_param.value }}
{% endif %}
+{% if authentication.radius.called_sid_format is defined and authentication.radius.called_sid_format is not none %}
+called-sid={{ authentication.radius.called_sid_format }}
+{% endif %}
{% if limits is defined %}
[connlimit]
@@ -146,12 +156,19 @@ burst={{ limits.burst }}
timeout={{ limits.timeout }}
{% endif %}
{% endif %}
-{% if authentication.radius.called_sid_format is defined and authentication.radius.called_sid_format is not none %}
-called-sid={{ authentication.radius.called_sid_format }}
-{% endif %}
{# Common RADIUS shaper configuration #}
{% include 'accel-ppp/config_shaper_radius.j2' %}
+{% if extended_scripts is defined %}
+[pppd-compat]
+verbose=1
+radattr-prefix=/run/accel-pppd/radattr
+{% set script_name = {'on_up': 'ip-up', 'on_down': 'ip-down', 'on_change':'ip-change', 'on_pre_up':'ip-pre-up'} %}
+{% for script in extended_scripts %}
+{{ script_name[script] }}={{ extended_scripts[script] }}
+{% endfor %}
+{% endif %}
+
[cli]
tcp=127.0.0.1:2001