summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/l2tp/2-to-310
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())