summaryrefslogtreecommitdiff
path: root/src/conf_mode/interface-ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-19 22:29:11 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-20 21:28:53 +0200
commitb27482c0201a433762168abe2d369ea43a599f1c (patch)
tree0cea3d990d9b941d7fd85b485a884107933951d4 /src/conf_mode/interface-ethernet.py
parent3bf0a5e586e9139e80cdecd14ab326cee5512fae (diff)
downloadvyos-1x-b27482c0201a433762168abe2d369ea43a599f1c.tar.gz
vyos-1x-b27482c0201a433762168abe2d369ea43a599f1c.zip
ethernet: T1637: interfaces in a bond can be disabled
Diffstat (limited to 'src/conf_mode/interface-ethernet.py')
-rwxr-xr-xsrc/conf_mode/interface-ethernet.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py
index 4f455e8d3..f82105847 100755
--- a/src/conf_mode/interface-ethernet.py
+++ b/src/conf_mode/interface-ethernet.py
@@ -253,12 +253,10 @@ def verify(eth):
# some options can not be changed when interface is enslaved to a bond
for bond in conf.list_nodes('interfaces bonding'):
if conf.exists('interfaces bonding ' + bond + ' member interface'):
- if eth['name'] in conf.return_values('interfaces bonding ' + bond + ' member interface'):
- if eth['disable']:
- raise ConfigError('Can not disable interface {} which is a member of {}').format(eth['intf'], bond)
-
- if eth['address']:
- raise ConfigError('Can not assign address to interface {} which is a member of {}').format(eth['intf'], bond)
+ bond_member = conf.return_values('interfaces bonding ' + bond + ' member interface')
+ if eth['name'] in bond_member:
+ if eth['address']:
+ raise ConfigError('Can not assign address to interface {} which is a member of {}').format(eth['intf'], bond)
return None