Page MenuHomeFreeBSD

netlink: Indicate that ifinfomsg uses IFT_* types
ClosedPublic

Authored by emaste on May 29 2026, 4:29 PM.
Tags
None
Referenced Files
F175039335: D57334.id178920.diff
Wed, Oct 7, 8:07 PM
Unknown Object (File)
Mon, Oct 5, 10:38 AM
Unknown Object (File)
Sun, Oct 4, 4:22 PM
Unknown Object (File)
Sun, Oct 4, 1:26 PM
Unknown Object (File)
Sat, Oct 3, 11:19 PM
Unknown Object (File)
Sat, Oct 3, 10:41 AM
Unknown Object (File)
Fri, Oct 2, 6:58 PM
Unknown Object (File)
Tue, Sep 29, 2:48 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.Jun 14 2026, 9:47 PM
This revision is now accepted and ready to land.Jun 15 2026, 6:40 AM