HomeFreeBSD

if_clone: correctly destroy a clone from a different vnet

Description

if_clone: correctly destroy a clone from a different vnet

Try to live with cruel reality fact - if_vmove doesn't move an
interface from previous vnet cloning infrastructure to the new
one. Let's admit this as design feature and make it work better.

  • Delete two blocks of code that would fallback to vnet0, if a cloner isn't found. They didn't do any good job and also whole idea of treating vnet0 as special one is wrong.
  • When deleting a cloned interface, lookup its cloner using it's home vnet.

With this change simple sequence works correctly:

ifconfig foo0 create
jail -c name=jj persist vnet vnet.interface=foo0
jexec jj ifconfig foo0 destroy

Differential revision: https://reviews.freebsd.org/D33942

Details

Provenance
glebiusAuthored on Jan 25 2022, 5:07 AM
Differential Revision
D33942: if_clone: correctly destroy a clone from a different vnet
Parents
rG54712fc42350: if_vmove: improve restoration in cloner's ifgroup membership
Branches
Unknown
Tags
Unknown