Netlink software which uses ifi_type from ifinfomsg structure expects it to be set to ARPHRD_* values, but currently it's getting set to if_type (from net/if_types.h). sys/netlink/route/iface.c:259 ifinfo->ifi_type = ifp->if_type ifinfomsg defenition is in sys/netlink/route/interface.h struct ifinfomsg { ... unsigned short ifi_type /* ARPHRD_* */ ... } Because of this software receives 0x6 (IFT_ETHER) instead of 0x1 (ARPHRD_ETHER) for wireless interfaces and 0x18 (IFT_LOOP) instead of 772 (ARPHRD_LOOPBACK). Same assignment happens in 14-current. Is this difference from Linux intentional?
^Triage: is this still a problem on recent versions of FreeBSD?
There are no FreeBSD changes related to this. I don't know if this was considered and is intentional, or just ended up this way; it does warrant consideration.
Header update in https://reviews.freebsd.org/D57334. Regardless of whether we would change this to follow the Linux values or not the header should reflect reality.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=21a75a85f0e0cc328b6e9b437d783ef0c25dc52e commit 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2026-05-29 16:23:17 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2026-06-15 12:36:16 +0000 netlink: Indicate that ifinfomsg uses IFT_* types 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 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334 share/man/man4/rtnetlink.4 | 17 +++++++++++++++-- sys/netlink/route/interface.h | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=76f29211f0dde8907250b77def3e58082e03afe1 commit 76f29211f0dde8907250b77def3e58082e03afe1 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2026-05-29 16:23:17 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2026-06-19 13:46:55 +0000 netlink: Indicate that ifinfomsg uses IFT_* types 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 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334 (cherry picked from commit 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e) share/man/man4/rtnetlink.4 | 17 +++++++++++++++-- sys/netlink/route/interface.h | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d7356667931edf880d80ea9a0cbd2fd3604077db commit d7356667931edf880d80ea9a0cbd2fd3604077db Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2026-05-29 16:23:17 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2026-06-19 13:51:52 +0000 netlink: Indicate that ifinfomsg uses IFT_* types 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 Reviewed by: pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57334 (cherry picked from commit 21a75a85f0e0cc328b6e9b437d783ef0c25dc52e) (cherry picked from commit 76f29211f0dde8907250b77def3e58082e03afe1) share/man/man4/rtnetlink.4 | 19 ++++++++++++++++--- sys/netlink/route/interface.h | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-)