git: 1f2b31f76e7d - main - linux(4): Add 2 Linux socket ioctl commands
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Aug 2023 19:58:34 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1f2b31f76e7d1ba591a4e7f4305c4acc2b1b4fa5 commit 1f2b31f76e7d1ba591a4e7f4305c4acc2b1b4fa5 Author: Alvin Chen <weike.chen_dell.com> AuthorDate: 2023-08-17 19:57:16 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-08-17 19:57:16 +0000 linux(4): Add 2 Linux socket ioctl commands Support 2 Linux socket ioctl commands: SIOCGIFMETRIC, SIOCSIFMETRIC. Differential revision: https://reviews.freebsd.org/D39786 MFC after: 1 month --- sys/compat/linux/linux_ioctl.c | 6 ++++++ sys/compat/linux/linux_ioctl.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 709f3ded977b..3b2727afd179 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -2272,6 +2272,12 @@ linux_ioctl_socket_ifreq(struct thread *td, int fd, u_int cmd, case LINUX_SIOCGIFHWADDR: cmd = SIOCGHWADDR; break; + case LINUX_SIOCGIFMETRIC: + cmd = SIOCGIFMETRIC; + break; + case LINUX_SIOCSIFMETRIC: + cmd = SIOCSIFMETRIC; + break; /* * XXX This is slightly bogus, but these ioctls are currently * XXX only used by the aironet (if_an) network driver. diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h index 42c36e43db6c..8a56e35d10c6 100644 --- a/sys/compat/linux/linux_ioctl.h +++ b/sys/compat/linux/linux_ioctl.h @@ -235,6 +235,8 @@ #define LINUX_SIOCGIFBRDADDR 0x8919 #define LINUX_SIOCGIFNETMASK 0x891b #define LINUX_SIOCSIFNETMASK 0x891c +#define LINUX_SIOCGIFMETRIC 0x891d +#define LINUX_SIOCSIFMETRIC 0x891e #define LINUX_SIOCGIFMTU 0x8921 #define LINUX_SIOCSIFMTU 0x8922 #define LINUX_SIOCSIFNAME 0x8923