Page MenuHomeFreeBSD

Fix group membership of a cloned interface before and after if_vmove()
ClosedPublic

Authored by hrs on Feb 16 2015, 6:03 PM.
Tags
None
Referenced Files
F137948065: D1859.id4076.diff
Thu, Nov 27, 2:09 PM
Unknown Object (File)
Tue, Nov 18, 6:03 AM
Unknown Object (File)
Fri, Oct 31, 1:27 AM
Unknown Object (File)
Wed, Oct 29, 12:50 PM
Unknown Object (File)
Wed, Oct 29, 12:50 PM
Unknown Object (File)
Wed, Oct 29, 12:50 PM
Unknown Object (File)
Wed, Oct 29, 6:52 AM
Unknown Object (File)
Oct 22 2025, 5:05 AM
Subscribers
None

Details

Summary

Problem description:

In if_vmove(), if_detach_internal() and if_attach_internal() are
called in series to detach and reattach the interface. When
detaching, if_delgroup() is called and the interface leaves all of
the group membership. And then upon attachment, if_addgroup(ifp,
IFG_ALL) is called and it joins only "all" group again.

This has a problem. Normally, a cloned interface automatically joins
a group whose name is ifc_name of the cloner in addition to "all"
upon creation. However, if_vmove() removes the membership and does
not restore upon attachment.

Implementation of fix:

  • if_detach_internal() now accepts (struct if_clone **) as an additional argument to make it possible to save the cloner information.
  • if_attach_internal() now accepts (struct if_clone *) to restore group membership of a cloned interface.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

hrs retitled this revision from to Fix group membership of a cloned interface before and after if_vmove().
hrs updated this object.
hrs edited the test plan for this revision. (Show Details)
hrs added a reviewer: bz.
hrs updated this revision to Diff 4076.

Closed by commit rS279538 (authored by @hrs).