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)
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
Unknown Object (File)
Sun, Jun 28, 3:22 PM
Unknown Object (File)
Fri, Jun 26, 7:18 AM
Unknown Object (File)
Fri, Jun 19, 2:21 AM
Unknown Object (File)
Sat, Jun 13, 11:22 AM

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.Sun, Jun 14, 9:47 PM
This revision is now accepted and ready to land.Mon, Jun 15, 6:40 AM