summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/templates/accel-ppp/config_shaper_radius.j210
-rw-r--r--data/templates/pppoe/ip-down.script.tmpl2
-rw-r--r--data/templates/pppoe/ip-up.script.tmpl2
-rw-r--r--data/templates/pppoe/ipv6-up.script.tmpl2
4 files changed, 11 insertions, 5 deletions
diff --git a/data/templates/accel-ppp/config_shaper_radius.j2 b/data/templates/accel-ppp/config_shaper_radius.j2
index c409c3718..b7bd9c128 100644
--- a/data/templates/accel-ppp/config_shaper_radius.j2
+++ b/data/templates/accel-ppp/config_shaper_radius.j2
@@ -1,7 +1,7 @@
-{% if authentication is defined and authentication.mode is defined and authentication.mode == 'radius' %}
-{% if authentication is defined and authentication.radius is defined and authentication.radius.rate_limit is defined and authentication.radius.rate_limit.enable is defined %}
+{% if authentication is defined and authentication.mode is defined and authentication.mode == 'radius' or shaper is defined %}
[shaper]
verbose=1
+{% if authentication is defined and authentication.radius is defined and authentication.radius.rate_limit is defined and authentication.radius.rate_limit.enable is defined %}
attr={{ authentication.radius.rate_limit.attribute }}
{% if authentication.radius.rate_limit.vendor is defined and authentication.radius.rate_limit.vendor is not none %}
vendor={{ authentication.radius.rate_limit.vendor }}
@@ -10,4 +10,10 @@ vendor={{ authentication.radius.rate_limit.vendor }}
rate-multiplier={{ authentication.radius.rate_limit.multiplier }}
{% endif %}
{% endif %}
+{% if shaper is defined %}
+{% if shaper.fwmark is defined and shaper.fwmark is not none %}
+fwmark={{ shaper.fwmark }}
+down-limiter=htb
+{% endif %}
+{% endif %}
{% endif %}
diff --git a/data/templates/pppoe/ip-down.script.tmpl b/data/templates/pppoe/ip-down.script.tmpl
index c1d1132b3..9db3219b3 100644
--- a/data/templates/pppoe/ip-down.script.tmpl
+++ b/data/templates/pppoe/ip-down.script.tmpl
@@ -11,7 +11,7 @@ DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
logger -t pppd[$DIALER_PID] "executing $0"
{% if connect_on_demand is not defined %}
-# See https://phabricator.vyos.net/T2248. Determine if we are enslaved to a
+# See https://vyos.dev/T2248. Determine if we are enslaved to a
# VRF, this is needed to properly insert the default route.
VRF_NAME=""
if [ -d /sys/class/net/{{ ifname }}/upper_* ]; then
diff --git a/data/templates/pppoe/ip-up.script.tmpl b/data/templates/pppoe/ip-up.script.tmpl
index 302756960..7f0c234fe 100644
--- a/data/templates/pppoe/ip-up.script.tmpl
+++ b/data/templates/pppoe/ip-up.script.tmpl
@@ -12,7 +12,7 @@ DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
logger -t pppd[$DIALER_PID] "executing $0"
{% if default_route != 'none' %}
-# See https://phabricator.vyos.net/T2248 & T2220. Determine if we are enslaved
+# See https://vyos.dev/T2248 & T2220. Determine if we are enslaved
# to a VRF, this is needed to properly insert the default route.
SED_OPT="^ip route"
diff --git a/data/templates/pppoe/ipv6-up.script.tmpl b/data/templates/pppoe/ipv6-up.script.tmpl
index 238f8c28e..245ef1b87 100644
--- a/data/templates/pppoe/ipv6-up.script.tmpl
+++ b/data/templates/pppoe/ipv6-up.script.tmpl
@@ -54,7 +54,7 @@ systemctl restart dhcp6c@{{ ifname }}.service
{% endif %}
{% if default_route != 'none' %}
-# See https://phabricator.vyos.net/T2248 & T2220. Determine if we are enslaved
+# See https://vyos.dev/T2248 & T2220. Determine if we are enslaved
# to a VRF, this is needed to properly insert the default route.
SED_OPT="^ipv6 route"