git: ba27b63c4477 - main - linux: Add STF type and convert some if_type to ARPHRD
Pouria Mousavizadeh Tehrani <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.current.scm |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=ba27b63c4477b0a6b796fe7807832870363201d0 commit ba27b63c4477b0a6b796fe7807832870363201d0 Author: Pouria Mousavizadeh Tehrani <[email protected]> AuthorDate: 2026-08-19 18:21:57 +0000 Commit: Pouria Mousavizadeh Tehrani <[email protected]> CommitDate: 2026-08-19 18:50:32 +0000 linux: Add STF type and convert some if_type to ARPHRD Convert IFT_BRIDGE and IFT_L2VLAN to ARPHRD_ETHER, and IFT_LOOP to ARPHRD_LOOPBACK in linux netlink. Also, add ARPHRD_SIT and convert IFT_STF to it. Reviewed by: kfv Differential Revision: https://reviews.freebsd.org/D58573 --- sys/compat/linux/linux.h | 1 + sys/compat/linux/linux_netlink.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 0c46860a6b36..336bb4aa796c 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -83,6 +83,7 @@ struct l_sockaddr { #define LINUX_ARPHRD_ETHER 1 #define LINUX_ARPHRD_LOOPBACK 772 +#define LINUX_ARPHRD_SIT 776 /* * Supported address families diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index 8c1659cb1dd8..ef6c52c013f9 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -366,8 +366,16 @@ rtnl_newlink_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, /* Convert interface type */ switch (ifinfo->ifi_type) { case IFT_ETHER: + case IFT_BRIDGE: + case IFT_L2VLAN: ifinfo->ifi_type = LINUX_ARPHRD_ETHER; break; + case IFT_LOOP: + ifinfo->ifi_type = LINUX_ARPHRD_LOOPBACK; + break; + case IFT_STF: + ifinfo->ifi_type = LINUX_ARPHRD_SIT; + break; } ifinfo->ifi_flags = rtnl_if_flags_to_linux(ifinfo->ifi_flags);