From 9e07ddb150fbf235466ce6de6f209d0ea3038b06 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 11 Apr 2020 00:34:44 +0200 Subject: vpn: l2tp: T2264: remove RADIUS req-limit node It makes less sense for the user to specify this behavior. --- src/migration-scripts/l2tp/2-to-3 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/migration-scripts') 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 . # - 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()) -- cgit v1.2.3