diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-11 00:34:44 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-11 11:25:59 +0200 |
commit | 9e07ddb150fbf235466ce6de6f209d0ea3038b06 (patch) | |
tree | 612fee84274d812a19a5e30fd19763b4213c12fb /src/migration-scripts/l2tp/2-to-3 | |
parent | 033062f56be9d531b1911e7d7516d7986aa68b46 (diff) | |
download | vyos-1x-9e07ddb150fbf235466ce6de6f209d0ea3038b06.tar.gz vyos-1x-9e07ddb150fbf235466ce6de6f209d0ea3038b06.zip |
vpn: l2tp: T2264: remove RADIUS req-limit node
It makes less sense for the user to specify this behavior.
Diffstat (limited to 'src/migration-scripts/l2tp/2-to-3')
-rwxr-xr-x | src/migration-scripts/l2tp/2-to-3 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/migration-scripts/l2tp/2-to-3 b/src/migration-scripts/l2tp/2-to-3 index f1f9b67b5..e24d1ffa9 100755 --- a/src/migration-scripts/l2tp/2-to-3 +++ b/src/migration-scripts/l2tp/2-to-3 @@ -15,6 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # - remove primary/secondary identifier from nameserver +# - TODO: remove radius server req-limit import os import sys @@ -56,7 +57,6 @@ else: config.delete(dns_base) - # Migrate IPv4 WINS servers wins_base = base + ['wins-servers'] if config.exists(wins_base): @@ -67,6 +67,14 @@ else: config.delete(wins_base) + + # Remove RADIUS server req-limit node + radius_base = base + ['authentication', 'radius'] + if config.exists(radius_base): + for server in config.list_nodes(radius_base + ['server']): + if config.exists(radius_base + ['server', server, 'req-limit']): + config.delete(radius_base + ['server', server, 'req-limit']) + try: with open(file_name, 'w') as f: f.write(config.to_string()) |