summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-05-02 15:54:42 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-05-04 22:59:40 +0200
commitb16dc5044eb9735c51ea211ea00fa35297d921f3 (patch)
treecf76b8e4c4d866b4ad9ee467692bebdfa873a382 /src/conf_mode
parentb38326721ce6448a865100a7da200a291388c029 (diff)
downloadvyos-1x-b16dc5044eb9735c51ea211ea00fa35297d921f3.tar.gz
vyos-1x-b16dc5044eb9735c51ea211ea00fa35297d921f3.zip
bridge: T2367: use simple 'ip addr flush' to flush member addresses
We've already verified that all member interfaces don't have any addresses configured, so it should be safe to simply call 'ip addr flush' on them to flush the remaining addresses (e.g. IPv6 link-local)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-bridge.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/conf_mode/interfaces-bridge.py b/src/conf_mode/interfaces-bridge.py
index fe3675190..c43fae78b 100755
--- a/src/conf_mode/interfaces-bridge.py
+++ b/src/conf_mode/interfaces-bridge.py
@@ -348,12 +348,8 @@ def apply(bridge):
# add interfaces to bridge
for member in bridge['member']:
- # flushes address of only children of Interfaces class
- # (e.g. vlan are not)
- if member['name'] in Section.interfaces():
- klass = Section.klass(member['name'], vlan=False)
- klass(member['name'], create=False).flush_addrs()
- # flushes all interfaces
+ # 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 "{member["name"]}"')
br.add_port(member['name'])