Page MenuHomeFreeBSD

netlink: some refactoring of NETLINK_GENERIC layer
Needs ReviewPublic

Authored by glebius on Fri, Jan 3, 10:35 PM.
Tags
None
Referenced Files
F106862458: D48316.diff
Mon, Jan 6, 2:20 PM
F106847759: D48316.id.diff
Mon, Jan 6, 9:02 AM
F106838670: D48316.id148757.diff
Mon, Jan 6, 6:07 AM
Unknown Object (File)
Sun, Jan 5, 7:20 PM
Unknown Object (File)
Sat, Jan 4, 11:44 AM
Unknown Object (File)
Fri, Jan 3, 10:38 PM
Subscribers

Details

Reviewers
melifaro
Group Reviewers
network
Summary
  • Statically initialize control family/group. This removes extra startup

code and provides a strong guarantee that they reside at the 0 index of
the respective arrays. Before a genl_register_family() with a higher
SYSINIT order could try to hijack index 0.

  • Remove the family_id field completely. Now the family ID as well as

group ID are array indices and there is basically no place for a mistake.
Previous code had a bug where a KPI user could induce an ID mismatch.

  • Merge netlink_generic_kpi.c to netlink_generic.c. Both files are small

and now there is more dependency between the control family and the family
allocator. Ok'ed by melifaro@.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61498
Build 58382: arc lint + arc unit