summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/ifconfig.py20
-rwxr-xr-xsrc/conf_mode/interface-bonding.py2
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py2
-rwxr-xr-xsrc/conf_mode/interface-vxlan.py2
4 files changed, 5 insertions, 21 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 776fe1a23..86a080602 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -314,29 +314,13 @@ class Interface:
cmd = 'ip link set dev {} {}'.format(self._ifname, state)
self._cmd(cmd)
- @property
- def proxy_arp(self):
- """
- Get current proxy ARP configuration from sysfs. Default: 0
-
- Example:
- >>> from vyos.ifconfig import Interface
- >>> Interface('eth0').proxy_arp
- '0'
- """
- return self._read_sysfs('/proc/sys/net/ipv4/conf/{}/proxy_arp'
- .format(self._ifname))
-
- @proxy_arp.setter
- def proxy_arp(self, enable):
+ def set_proxy_arp(self, enable):
"""
Set per interface proxy ARP configuration
Example:
>>> from vyos.ifconfig import Interface
- >>> Interface('eth0').proxy_arp = 1
- >>> Interface('eth0').proxy_arp
- '1'
+ >>> Interface('eth0').set_proxy_arp(1)
"""
if int(enable) >= 0 and int(enable) <= 1:
return self._write_sysfs('/proc/sys/net/ipv4/conf/{}/proxy_arp'
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py
index 8b4c8b625..2058a3342 100755
--- a/src/conf_mode/interface-bonding.py
+++ b/src/conf_mode/interface-bonding.py
@@ -382,7 +382,7 @@ def apply(bond):
# configure ARP cache timeout in milliseconds
b.arp_cache_tmp = bond['ip_arp_cache_tmo']
# Enable proxy-arp on this interface
- b.proxy_arp = bond['ip_proxy_arp']
+ b.set_proxy_arp(bond['ip_proxy_arp'])
# Enable private VLAN proxy ARP on this interface
b.proxy_arp_pvlan = bond['ip_proxy_arp_pvlan']
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index 5c8c76827..e15e89232 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -284,7 +284,7 @@ def apply(eth):
# configure ARP cache timeout in milliseconds
e.arp_cache_tmo = eth['ip_arp_cache_tmo']
# Enable proxy-arp on this interface
- e.proxy_arp = eth['ip_proxy_arp']
+ e.set_proxy_arp(eth['ip_proxy_arp'])
# Enable private VLAN proxy ARP on this interface
e.proxy_arp_pvlan = eth['ip_proxy_arp_pvlan']
diff --git a/src/conf_mode/interface-vxlan.py b/src/conf_mode/interface-vxlan.py
index 638efda31..b7aa55b61 100755
--- a/src/conf_mode/interface-vxlan.py
+++ b/src/conf_mode/interface-vxlan.py
@@ -170,7 +170,7 @@ def apply(vxlan):
# configure ARP cache timeout in milliseconds
v.arp_cache_tmp = vxlan['ip_arp_cache_tmo']
# Enable proxy-arp on this interface
- v.proxy_arp = vxlan['ip_proxy_arp']
+ v.set_proxy_arp(vxlan['ip_proxy_arp'])
# Configure interface address(es) - no need to implicitly delete the
# old addresses as they have already been removed by deleting the