summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--interface-definitions/interfaces-pppoe.xml.in20
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py8
-rwxr-xr-xsrc/migration-scripts/interfaces/4-to-59
3 files changed, 16 insertions, 21 deletions
diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in
index 933d9edf1..b6b54c915 100644
--- a/interface-definitions/interfaces-pppoe.xml.in
+++ b/interface-definitions/interfaces-pppoe.xml.in
@@ -140,24 +140,10 @@
<constraintErrorMessage>MTU must be between 68 and 1500</constraintErrorMessage>
</properties>
</leafNode>
- <leafNode name="name-server">
+ <leafNode name="no-peer-dns">
<properties>
- <help>Enable/Disable use of name server entries from peer</help>
- <completionHelp>
- <list>auto none</list>
- </completionHelp>
- <valueHelp>
- <format>auto</format>
- <description>Install default route when link comes up</description>
- </valueHelp>
- <valueHelp>
- <format>none</format>
- <description>Do not install default route when link comes up</description>
- </valueHelp>
- <constraint>
- <regex>(auto|none)</regex>
- </constraint>
- <constraintErrorMessage>Must be either 'auto' or 'none'</constraintErrorMessage>
+ <help>Do not use DNS servers provided by the peer</help>
+ <valueless/>
</properties>
</leafNode>
<leafNode name="remote-address">
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index d2147fa1f..4ca7f3ecb 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -104,7 +104,7 @@ default_config_data = {
'ipv6_enable': False,
'local_address': '',
'mtu': '1492',
- 'name_server': 'auto',
+ 'name_server': True,
'remote_address': '',
'service_name': '',
'source_interface': ''
@@ -185,9 +185,9 @@ def get_config():
if conf.exists(['mtu']):
pppoe['mtu'] = conf.return_value(['mtu'])
- # IPv4 address of local end of the PPPoE link
- if conf.exists(['name-server']):
- pppoe['name_server'] = conf.return_value(['name-server'])
+ # Do not use DNS servers provided by the peer
+ if conf.exists(['no-peer-dns']):
+ pppoe['name_server'] = False
# IPv4 address for remote end of PPPoE session
if conf.exists(['remote-address']):
diff --git a/src/migration-scripts/interfaces/4-to-5 b/src/migration-scripts/interfaces/4-to-5
index dd1e9a51e..2a42c60ff 100755
--- a/src/migration-scripts/interfaces/4-to-5
+++ b/src/migration-scripts/interfaces/4-to-5
@@ -19,6 +19,15 @@ def migrate_dialer(config, tree, intf):
# parts
config.copy(tree + [pppoe], pppoe_base)
+ # Instead of letting the user choose between auto and none
+ # where auto is default, it makes more sesne to just offer
+ # an option to disable the default behavior (declutter CLI)
+ if config.exists(pppoe_base + ['name-server']):
+ tmp = config.return_value(pppoe_base + ['name-server'])
+ if tmp == "none":
+ config.set(pppoe_base + ['no-peer-dns'])
+ config.delete(pppoe_base + ['name-server'])
+
# Migrate user-id and password nodes under an 'authentication'
# node
if config.exists(pppoe_base + ['user-id']):