Page MenuHomeFreeBSD

bridge: Remove members when assigned to a new vnet
ClosedPublic

Authored by kp on Mon, Feb 22, 2:32 PM.

Details

Summary

When the bridge is moved to a different vnet we must remove all of its
member interfaces (and span interfaces), because we don't know if those
will be moved along with it. We don't want to hold references to
interfaces not in our vnet.

MFC after: 1 week
Sponsored by: Orange Business Services

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kp requested review of this revision.Mon, Feb 22, 2:32 PM
donner added inline comments.
sys/net/if_ethersubr.c
977–979

Remove this too?

1034–1051

dito

sys/net/if_ethersubr.c
977–979

No, because there are other callers (pretty much every ethernet NIC driver) to ether_ifattach() that we don't want to modify.

sys/net/if_ethersubr.c
120–122

Why is the prototype removed?

sys/net/if_ethersubr.c
120–122

It moved to sys/net/ethernet.h so that the function can be used by if_bridge.

In essence what we're doing is adding steps in front of the ether_reassign() code for if_bridge.

This revision is now accepted and ready to land.Mon, Feb 22, 7:20 PM