summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-05-04 15:30:10 +0200
committerGitHub <noreply@github.com>2020-05-04 15:30:10 +0200
commit66ecfc6ecada4e50562dcfa4635b83daa5b0b1ff (patch)
treec540797eb03ff6dea0f8715c774a70ba6cdf970d
parent2315092353b2fbf32c2c6a4055ed245f27ab2531 (diff)
parentde5540e49a0e66805204c424686556451592de45 (diff)
downloadvyos-1x-66ecfc6ecada4e50562dcfa4635b83daa5b0b1ff.tar.gz
vyos-1x-66ecfc6ecada4e50562dcfa4635b83daa5b0b1ff.zip
Merge pull request #392 from DmitriyEshenko/ipoe-cur-fix01
ipoe: T2294: Fix nodes path
-rwxr-xr-xsrc/conf_mode/service_ipoe-server.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/conf_mode/service_ipoe-server.py b/src/conf_mode/service_ipoe-server.py
index b53692d37..84443ade3 100755
--- a/src/conf_mode/service_ipoe-server.py
+++ b/src/conf_mode/service_ipoe-server.py
@@ -112,28 +112,30 @@ def get_config():
'name': interface,
'mac': []
}
- for client in conf.list_nodes(base_path + ['authentication', 'interface', interface, 'mac-address']):
- mac = {
+ for mac in conf.list_nodes(['authentication', 'interface', interface, 'mac-address']):
+ client = {
'address': mac,
'rate_download': '',
'rate_upload': '',
'vlan_id': ''
}
- conf.set_level(base_path + ['authentication', 'interface', interface, 'mac-address', client])
+ conf.set_level(base_path + ['authentication', 'interface', interface, 'mac-address', mac])
if conf.exists(['rate-limit', 'download']):
- mac['rate_download'] = conf.return_value(['rate-limit', 'download'])
+ client['rate_download'] = conf.return_value(['rate-limit', 'download'])
if conf.exists(['rate-limit', 'upload']):
- mac['rate_upload'] = conf.return_value(['rate-limit', 'upload'])
+ client['rate_upload'] = conf.return_value(['rate-limit', 'upload'])
if conf.exists(['vlan-id']):
- mac['vlan'] = conf.return_value(['vlan-id'])
+ client['vlan'] = conf.return_value(['vlan-id'])
- tmp['mac'].append(mac)
+ tmp['mac'].append(client)
ipoe['auth_interfaces'].append(tmp)
+ conf.set_level(base_path)
+
#
# authentication mode radius servers and settings
if conf.exists(['authentication', 'mode', 'radius']):