Page MenuHomeFreeBSD

netlink: Indicate that ifinfomsg uses IFT_* types
ClosedPublic

Authored by emaste on May 29 2026, 4:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 11, 1:10 AM
Unknown Object (File)
Sat, Oct 10, 11:30 PM
Unknown Object (File)
Fri, Oct 9, 4:19 PM
Unknown Object (File)
Fri, Oct 9, 3:57 PM
Unknown Object (File)
Thu, Oct 8, 11:30 PM
Unknown Object (File)
Wed, Oct 7, 8:07 PM
Unknown Object (File)
Mon, Oct 5, 10:38 AM
Unknown Object (File)
Sun, Oct 4, 4:22 PM

Details

Summary
On Linux struct ifinfomsg uses ARPHRD_* values, while we used IFT_*
types (which derive from SNMP ifType definitions in RFC 1573).
Update the header to reflect this.

PR:             272144

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

netlink specs clearly want to use arp types (ARPHRD_*). (See include/uapi/linux/rtnetlink.h of linux)
However, IMO, using arp types are not appropriate here, because we actually want to get the actual interface type ifp->if_type.
therefore our current implementation (IFT_*) is correct.

We also provide compatibility for linux.
For example we map our IFT_ETHER to ARPHDR_ETHER type in sys/compat/linux/linux_netlink.c:366.

This should be enough reasoning/evidence for PR272144.
Please add a note here to clarify that NOT using ARPHRD_* is intentional.
This should also close that PR too.

This revision is now accepted and ready to land.May 29 2026, 9:21 PM

Don't forget to update the comment on the man page for rtnetlink(4).

This revision now requires review to proceed.Jun 14 2026, 9:47 PM
This revision is now accepted and ready to land.Jun 15 2026, 6:40 AM