summaryrefslogtreecommitdiff
path: root/python/vyos/configdict.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-03 16:26:42 +0100
committerChristian Poessinger <christian@poessinger.com>2020-01-03 16:26:44 +0100
commit410ac0dac8400aae1523a51184726ff7606dc5fd (patch)
tree97d8c2c8cf612033e8d10dd256d72d58e4843e4f /python/vyos/configdict.py
parent7bb193ce644ea73e4acaa345c84326cb5e0ef78e (diff)
downloadvyos-1x-410ac0dac8400aae1523a51184726ff7606dc5fd.tar.gz
vyos-1x-410ac0dac8400aae1523a51184726ff7606dc5fd.zip
ifconfig: T1939: provide abstraction for interface "ip" option
Provide an XML/Python abstraction to * ip disable-arp-filter * ip enable-arp-accept * ip enable-arp-announce * ip enable-arp-ignore The old implementation can co-exist until the last interfaces have been migrated.
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r--python/vyos/configdict.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 7f5ae3db9..80e199907 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -119,6 +119,10 @@ def vlan_to_dict(conf):
'disable_link_detect': 1,
'egress_qos': '',
'egress_qos_changed': False,
+ 'ip_disable_arp_filter': 1,
+ 'ip_enable_arp_accept': 0,
+ 'ip_enable_arp_announce': 0,
+ 'ip_enable_arp_ignore': 0,
'ingress_qos': '',
'ingress_qos_changed': False,
'mac': '',
@@ -166,6 +170,22 @@ def vlan_to_dict(conf):
if conf.exists('disable'):
vlan['disable'] = True
+ # ARP filter configuration
+ if conf.exists('ip disable-arp-filter'):
+ vlan['ip_disable_arp_filter'] = 0
+
+ # ARP enable accept
+ if conf.exists('ip enable-arp-accept'):
+ vlan['ip_enable_arp_accept'] = 1
+
+ # ARP enable announce
+ if conf.exists('ip enable-arp-announce'):
+ vlan['ip_enable_arp_announce'] = 1
+
+ # ARP enable ignore
+ if conf.exists('ip enable-arp-ignore'):
+ vlan['ip_enable_arp_ignore'] = 1
+
# Media Access Control (MAC) address
if conf.exists('mac'):
vlan['mac'] = conf.return_value('mac')