diff options
-rw-r--r-- | interface-definitions/vpn_sstp.xml.in | 2 | ||||
-rwxr-xr-x | src/conf_mode/vpn_sstp.py | 5 | ||||
-rwxr-xr-x | src/migration-scripts/sstp/2-to-3 | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/interface-definitions/vpn_sstp.xml.in b/interface-definitions/vpn_sstp.xml.in index d5e23fe40..3d28878bc 100644 --- a/interface-definitions/vpn_sstp.xml.in +++ b/interface-definitions/vpn_sstp.xml.in @@ -25,6 +25,7 @@ </node> </children> </node> + #include <include/accel-name-server.xml.i> <node name="network-settings"> <properties> <help>Network settings</help> @@ -40,7 +41,6 @@ </children> </node> #include <include/accel-client-ipv6-pool.xml.i> - #include <include/accel-name-server.xml.i> #include <include/interface-mtu-68-1500.xml.i> </children> </node> diff --git a/src/conf_mode/vpn_sstp.py b/src/conf_mode/vpn_sstp.py index 5d928a945..30972f60d 100755 --- a/src/conf_mode/vpn_sstp.py +++ b/src/conf_mode/vpn_sstp.py @@ -260,7 +260,7 @@ def get_config(config=None): # # read in network settings - conf.set_level(base_path + ['network-settings']) + conf.set_level(base_path) if conf.exists(['name-server']): for name_server in conf.return_values(['name-server']): if is_ipv4(name_server): @@ -268,6 +268,9 @@ def get_config(config=None): else: sstp['dnsv6'].append(name_server) + # + # read in network settings + conf.set_level(base_path + ['network-settings']) if conf.exists(['mtu']): sstp['mtu'] = conf.return_value(['mtu']) diff --git a/src/migration-scripts/sstp/2-to-3 b/src/migration-scripts/sstp/2-to-3 index 51f4effed..db705f5eb 100755 --- a/src/migration-scripts/sstp/2-to-3 +++ b/src/migration-scripts/sstp/2-to-3 @@ -39,6 +39,11 @@ else: if config.exists(base_path + ['ppp-settings']): config.rename(base_path + ['ppp-settings'], 'ppp-options') + config_ns = base_path + ['network-settings', 'name-server'] + if config.exists(config_ns): + config.copy(config_ns, base_path + ['name-server']) + config.delete(config_ns) + try: with open(file_name, 'w') as f: f.write(config.to_string()) |