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)
Thu, Jul 16, 3:11 AM
Unknown Object (File)
Thu, Jul 16, 1:17 AM
Unknown Object (File)
Wed, Jul 15, 7:24 AM
Unknown Object (File)
Wed, Jul 15, 7:24 AM
Unknown Object (File)
Tue, Jun 30, 5:12 PM
Unknown Object (File)
Tue, Jun 30, 5:03 PM
Unknown Object (File)
Tue, Jun 30, 5:03 PM
Unknown Object (File)
Mon, Jun 29, 10:44 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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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