Skip to content

Commit b4d0782

Browse files
committed
Merge branch 'net-if_arp-use-define-instead-of-hard-coded-value'
Håkon Bugge says: ==================== net: if_arp: use define instead of hard-coded value Struct arpreq contains the name of the device. All other places in the kernel, the define IFNAMSIZ is used to designate its size. But in if_arp.h, a literal constant is used. As it could be good reasons to use constants instead of the defines in include files under uapi, it seems to be OK to use the define here, without opening a can of worms in user-land. This because if_arp.h includes netdevice.h, which also uses IFNAMSIZ. For the distros I have checked, this also holds true for the use-land side. The series also fixes some incorrect indents. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents a42055e + 6a12709 commit b4d0782

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/uapi/linux/if_arp.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@
114114

115115
/* ARP ioctl request. */
116116
struct arpreq {
117-
struct sockaddr arp_pa; /* protocol address */
118-
struct sockaddr arp_ha; /* hardware address */
119-
int arp_flags; /* flags */
120-
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
121-
char arp_dev[16];
117+
struct sockaddr arp_pa; /* protocol address */
118+
struct sockaddr arp_ha; /* hardware address */
119+
int arp_flags; /* flags */
120+
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
121+
char arp_dev[IFNAMSIZ];
122122
};
123123

124124
struct arpreq_old {
125-
struct sockaddr arp_pa; /* protocol address */
126-
struct sockaddr arp_ha; /* hardware address */
127-
int arp_flags; /* flags */
128-
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
125+
struct sockaddr arp_pa; /* protocol address */
126+
struct sockaddr arp_ha; /* hardware address */
127+
int arp_flags; /* flags */
128+
struct sockaddr arp_netmask; /* netmask (only for proxy arps) */
129129
};
130130

131131
/* ARP Flag values. */

0 commit comments

Comments
 (0)