summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-08-11 22:24:05 +0200
committerChristian Breunig <christian@breunig.cc>2023-08-11 22:26:06 +0200
commit63a8d17b89597e990e44f5b0111419778917e689 (patch)
treeab00556cda70a91d62af8261ae93b1202c947e5d
parent482f7e352272b6ec16ba5d1ac7d9d7ea51d10f1d (diff)
downloadvyos-1x-63a8d17b89597e990e44f5b0111419778917e689.tar.gz
vyos-1x-63a8d17b89597e990e44f5b0111419778917e689.zip
ipv6: T5464: use proper XML default for DAD transmits
This is only a cosmetic change so that the default value is properly retrieved from the defaultValue XML node.
-rw-r--r--interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i3
-rw-r--r--python/vyos/ifconfig/interface.py3
2 files changed, 3 insertions, 3 deletions
diff --git a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i
index babe6d20f..3b9294dd0 100644
--- a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i
+++ b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i
@@ -1,7 +1,7 @@
<!-- include start from interface/ipv6-dup-addr-detect-transmits.xml.i -->
<leafNode name="dup-addr-detect-transmits">
<properties>
- <help>Number of NS messages to send while performing DAD (default: 1)</help>
+ <help>Number of NS messages to send while performing DAD</help>
<valueHelp>
<format>u32:0</format>
<description>Disable Duplicate Address Dectection (DAD)</description>
@@ -14,5 +14,6 @@
<validator name="numeric" argument="--non-negative"/>
</constraint>
</properties>
+ <defaultValue>1</defaultValue>
</leafNode>
<!-- include end -->
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index 75c5f27a9..6e85b7a9d 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -1553,8 +1553,7 @@ class Interface(Control):
# IPv6 Duplicate Address Detection (DAD) tries
tmp = dict_search('ipv6.dup_addr_detect_transmits', config)
- value = tmp if (tmp != None) else '1'
- self.set_ipv6_dad_messages(value)
+ self.set_ipv6_dad_messages(tmp)
# Delete old IPv6 EUI64 addresses before changing MAC
for addr in (dict_search('ipv6.address.eui64_old', config) or []):