diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-07-30 23:31:55 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-07-30 23:31:55 +0200 |
commit | 29dd5079ad38e82363032b585304d509db0fea8e (patch) | |
tree | f64d9e1c9a405ee9ca38c431d6d453f6eac3cc7f /python/vyos/ifconfig/bridge.py | |
parent | f75f9cf6aae10c061e7b757b4e8a658b4457def7 (diff) | |
download | vyos-1x-29dd5079ad38e82363032b585304d509db0fea8e.tar.gz vyos-1x-29dd5079ad38e82363032b585304d509db0fea8e.zip |
ifconfig: T2653: remove duplicated code for address flush
Diffstat (limited to 'python/vyos/ifconfig/bridge.py')
-rw-r--r-- | python/vyos/ifconfig/bridge.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py index da4e1a289..e4ae0a80a 100644 --- a/python/vyos/ifconfig/bridge.py +++ b/python/vyos/ifconfig/bridge.py @@ -237,9 +237,10 @@ class BridgeIf(Interface): tmp = jmespath.search('member.interface', config) if tmp: for interface, interface_config in tmp.items(): - # if we've come here we already verified the interface doesn't - # have addresses configured so just flush any remaining ones - cmd(f'ip addr flush dev "{interface}"') + # if we've come here we already verified the interface + # does not have an addresses configured so just flush + # any remaining ones + self.flush_addrs(interface) # enslave interface port to bridge self.add_port(interface) |