Date: Fri, 19 Jun 2026 13:52:36 +0000 From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d7356667931e - stable/14 - netlink: Indicate that ifinfomsg uses IFT_* types Message-ID: <6a3549a4.3a995.7b80195d@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by emaste: 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(-) diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 index 720a9cc75ef2..19bfee91ce38 100644 --- a/share/man/man4/rtnetlink.4 +++ b/share/man/man4/rtnetlink.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2022 +.Dd June 15, 2026 .Dt RTNETLINK 4 .Os .Sh NAME @@ -272,12 +272,25 @@ All interface configuration messages share the common header: struct ifinfomsg { unsigned char ifi_family; /* not used, set to 0 */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ - int ifi_index; /* Inteface index */ + unsigned short ifi_type; /* IFT_* */ + int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ }; .Ed +.Pp +.Sy Note : +On +.Fx +the +.Va ifi_type +field uses +.Dv IFT_* +constants from +.In net/if_types.h +rather than +.Dv ARPHRD_* +as on Linux. .Ss RTM_NEWLINK Creates a new interface. The only mandatory TLV is diff --git a/sys/netlink/route/interface.h b/sys/netlink/route/interface.h index 667bf2c96151..6034ff1657eb 100644 --- a/sys/netlink/route/interface.h +++ b/sys/netlink/route/interface.h @@ -36,8 +36,8 @@ struct ifinfomsg { unsigned char ifi_family; /* not used */ unsigned char __ifi_pad; - unsigned short ifi_type; /* ARPHRD_* */ - int ifi_index; /* Inteface index */ + unsigned short ifi_type; /* IFT_* (net/if_types.h) */ + int ifi_index; /* Interface index */ unsigned ifi_flags; /* IFF_* flags */ unsigned ifi_change; /* IFF_* change mask */ };home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3549a4.3a995.7b80195d>
