Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177925624
D38792.1795581095.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D38792.1795581095.diff
View Options
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -2097,7 +2097,7 @@
error = copyin(uifr, &ifr, sizeof(ifr));
if (error != 0)
return (error);
- ret = ifname_bsd_to_linux_idx(ifr.ifr_ifindex, ifr.ifr_name,
+ ret = ifname_bsd_to_linux_idx(ifr.ifr_index, ifr.ifr_name,
LINUX_IFNAMSIZ);
if (ret > 0)
return (copyout(&ifr, uifr, sizeof(ifr)));
diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h
--- a/sys/compat/linux/linux_socket.h
+++ b/sys/compat/linux/linux_socket.h
@@ -336,11 +336,13 @@
/* 3 bytes spare */
};
+/*
+ * Careful changing the declaration of this structure.
+ * To use FreeBSD names to access the struct l_ifreq members the
+ * member names of struct l_ifreq should be equal to the FreeBSD.
+ */
struct l_ifreq {
- union {
- char ifrn_name[LINUX_IFNAMSIZ];
- } ifr_ifrn;
-
+ char ifr_name[LINUX_IFNAMSIZ];
union {
struct l_sockaddr ifru_addr;
struct l_sockaddr ifru_dstaddr;
@@ -348,7 +350,7 @@
struct l_sockaddr ifru_netmask;
struct l_sockaddr ifru_hwaddr;
l_short ifru_flags[1];
- l_int ifru_ivalue;
+ l_int ifru_index;
l_int ifru_mtu;
struct l_ifmap ifru_map;
char ifru_slave[LINUX_IFNAMSIZ];
@@ -357,8 +359,9 @@
} ifr_ifru;
};
-#define ifr_name ifr_ifrn.ifrn_name /* Interface name */
+/*
+ * Define here members which are not exists in the FreeBSD struct ifreq.
+ */
#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
-#define ifr_ifindex ifr_ifru.ifru_ivalue /* Interface index */
#endif /* _LINUX_SOCKET_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 25, 4:31 AM (10 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41979451
Default Alt Text
D38792.1795581095.diff (1 KB)
Attached To
Mode
D38792: linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD
Attached
Detach File
Event Timeline