From b16dc5044eb9735c51ea211ea00fa35297d921f3 Mon Sep 17 00:00:00 2001 From: Jernej Jakob Date: Sat, 2 May 2020 15:54:42 +0200 Subject: 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) --- src/conf_mode/interfaces-bridge.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') 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']) -- cgit v1.2.3