summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2022-03-15 18:29:12 +0200
committerChristian Poessinger <christian@poessinger.com>2022-03-15 21:20:34 +0100
commit9f40bd4dd5dd51d895acb889b9c2ac37e9c40727 (patch)
tree1ab8b6572d2d53ea3cb00039b6ede6f96be9f3b7 /src
parentcfa98d3e281f258e733664bbf375d3633ffe0205 (diff)
downloadvyos-1x-9f40bd4dd5dd51d895acb889b9c2ac37e9c40727.tar.gz
vyos-1x-9f40bd4dd5dd51d895acb889b9c2ac37e9c40727.zip
bonding: T4301: Fixed arp-monitor option
In verify function for arp-monitor option was used by mistake an extra conversion for incoming data before comparing items. This commit removed these unnecessary conversions and makes the option operable. (cherry picked from commit df4b544c29974e36b52fc42bcbf617f50738a4a6)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-bonding.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-bonding.py b/src/conf_mode/interfaces-bonding.py
index 431d65f1f..d5be21949 100755
--- a/src/conf_mode/interfaces-bonding.py
+++ b/src/conf_mode/interfaces-bonding.py
@@ -132,10 +132,10 @@ def verify(bond):
return None
if 'arp_monitor' in bond:
- if 'target' in bond['arp_monitor'] and len(int(bond['arp_monitor']['target'])) > 16:
+ if 'target' in bond['arp_monitor'] and len(bond['arp_monitor']['target']) > 16:
raise ConfigError('The maximum number of arp-monitor targets is 16')
- if 'interval' in bond['arp_monitor'] and len(int(bond['arp_monitor']['interval'])) > 0:
+ if 'interval' in bond['arp_monitor'] and int(bond['arp_monitor']['interval']) > 0:
if bond['mode'] in ['802.3ad', 'balance-tlb', 'balance-alb']:
raise ConfigError('ARP link monitoring does not work for mode 802.3ad, ' \
'transmit-load-balance or adaptive-load-balance')