summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-13 20:41:23 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-13 20:43:37 +0200
commit2e9ed5ad782fb632f3a0bb026cd3a566ab3862d4 (patch)
treed47460c0c68dc82e51c9c371dbf22e70db0aae93 /src
parent7d46fa6fc41b13bf9b3a9e3a305d9309079762f1 (diff)
downloadvyos-1x-2e9ed5ad782fb632f3a0bb026cd3a566ab3862d4.tar.gz
vyos-1x-2e9ed5ad782fb632f3a0bb026cd3a566ab3862d4.zip
bonding: T1660: bugfix for triggered OS permission denied exception
Some bond modes do not support arp monitor interval and thus internally eset it to 0 which means disabled. If you then write to the sysfs file in question an OS exception (permission denied) is triggered. arp_mon_intvl is initialized as 0 which means disabled so we only write it when it is really requested by the user. There is a validator ensuring that it can only be set in the bond modes which support it.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interface-bonding.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/conf_mode/interface-bonding.py b/src/conf_mode/interface-bonding.py
index dc0363fb7..08bc4857b 100755
--- a/src/conf_mode/interface-bonding.py
+++ b/src/conf_mode/interface-bonding.py
@@ -354,12 +354,12 @@ def apply(bond):
for intf in b.get_slaves():
b.del_port(intf)
- # ARP link monitoring frequency
- b.arp_interval = bond['arp_mon_intvl']
- # reset miimon on arp-montior deletion
+ # ARP link monitoring frequency, reset miimon when arp-montior is inactive
if bond['arp_mon_intvl'] == 0:
# reset miimon to default
b.bond_miimon = 250
+ else:
+ b.arp_interval = bond['arp_mon_intvl']
# ARP monitor targets need to be synchronized between sysfs and CLI.
# Unfortunately an address can't be send twice to sysfs as this will