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 | |
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.
-rw-r--r-- | interface-definitions/vpn-l2tp.xml.in | 5 | ||||
-rwxr-xr-x | src/migration-scripts/l2tp/2-to-3 | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/interface-definitions/vpn-l2tp.xml.in b/interface-definitions/vpn-l2tp.xml.in index 5604ea3d2..5f0537de5 100644 --- a/interface-definitions/vpn-l2tp.xml.in +++ b/interface-definitions/vpn-l2tp.xml.in @@ -428,11 +428,6 @@ <help>Key for accessing the specified server</help> </properties> </leafNode> - <leafNode name="req-limit"> - <properties> - <help>Maximum number of simultaneous requests to server (default: unlimited)</help> - </properties> - </leafNode> <leafNode name="fail-time"> <properties> <help>If server doesn not responds mark it unavailable for this time (seconds)</help> 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()) |