summaryrefslogtreecommitdiff
path: root/data/templates/accel-ppp/config_shaper_radius.j2
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-02-12 12:55:39 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-02-12 12:55:39 +0000
commit8c98ceeee57d062969456d1848b952ed9a3dd7fb (patch)
treeff0568a121089d758f90523e87ff6275288bb38e /data/templates/accel-ppp/config_shaper_radius.j2
parent0a5579b84d7c4280fe429bd45a70482a83b8d887 (diff)
downloadvyos-1x-8c98ceeee57d062969456d1848b952ed9a3dd7fb.tar.gz
vyos-1x-8c98ceeee57d062969456d1848b952ed9a3dd7fb.zip
T1993: PPPoE-server add section shaper and fwmark option
Extended PPPoE-server rate-limiter to avoid shaping marked resources Often this feature needs for ISP, which provides access to some IX or its resources. set service pppoe-server shaper fwmark '223'
Diffstat (limited to 'data/templates/accel-ppp/config_shaper_radius.j2')
-rw-r--r--data/templates/accel-ppp/config_shaper_radius.j210
1 files changed, 8 insertions, 2 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 %}