From caec7a022a5760cac1bf67499e77c3028571d510 Mon Sep 17 00:00:00 2001 From: hagbard Date: Tue, 18 Jun 2019 15:07:41 -0700 Subject: [pppoe-server] T1452 - add vendor option to shaper (cherry picked from commit 85c9e0200a4619f0388b7fd7ba9a03f4be933ef5) --- interface-definitions/pppoe-server.xml | 5 +++++ src/conf_mode/accel_pppoe.py | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/interface-definitions/pppoe-server.xml b/interface-definitions/pppoe-server.xml index 1190cd9ff..18b0e649c 100644 --- a/interface-definitions/pppoe-server.xml +++ b/interface-definitions/pppoe-server.xml @@ -194,6 +194,11 @@ Specifies which radius attribute contains rate information. (default is Filter-Id) + + + Specifies the vendor dictionary. (dictionary needs to be in /usr/share/accel-ppp/radius) + + Enables Bandwidth shaping via RADIUS diff --git a/src/conf_mode/accel_pppoe.py b/src/conf_mode/accel_pppoe.py index 3b3bf8cac..97e3723f0 100755 --- a/src/conf_mode/accel_pppoe.py +++ b/src/conf_mode/accel_pppoe.py @@ -169,6 +169,9 @@ verbose=1 [shaper] verbose=1 attr={{authentication['radiusopt']['shaper']['attr']}} +{% if authentication['radiusopt']['shaper']['vendor'] %} +vendor={{authentication['radiusopt']['shaper']['vendor']}} +{% endif -%} {% endif -%} {% endif %} @@ -476,6 +479,9 @@ def get_config(): config_data['authentication']['radiusopt']['shaper'] = { 'attr' : c.return_value('authentication radius-settings rate-limit attribute') } + if c.exists('authentication radius-settings rate-limit vendor'): + config_data['authentication']['radiusopt']['shaper']['vendor'] = c.return_value('authentication radius-settings rate-limit vendor') + if c.exists('mtu'): config_data['mtu'] = c.return_value('mtu') -- cgit v1.2.3