diff options
author | David S. Miller <davem@davemloft.net> | 2018-09-21 19:22:32 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-21 19:22:32 -0700 |
commit | b4d0782440ed38c14ff145ead241d5fcc95a37b7 (patch) | |
tree | 60fdc2678ff4aabc4906b5d2bb24738cf3ad7596 | |
parent | a42055e8d2c30d4decfc13ce943d09c7b9dad221 (diff) | |
parent | 6a12709da354ea149fdf86c4c9aba5b5033e9cf2 (diff) | |
download | linux-stable-b4d0782440ed38c14ff145ead241d5fcc95a37b7.tar.gz linux-stable-b4d0782440ed38c14ff145ead241d5fcc95a37b7.tar.bz2 linux-stable-b4d0782440ed38c14ff145ead241d5fcc95a37b7.zip |
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>
-rw-r--r-- | include/uapi/linux/if_arp.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index 4605527ca41b..c3cc5a9e5eaf 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h @@ -114,18 +114,18 @@ /* ARP ioctl request. */ struct arpreq { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ - char arp_dev[16]; + struct sockaddr arp_pa; /* protocol address */ + struct sockaddr arp_ha; /* hardware address */ + int arp_flags; /* flags */ + struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ + char arp_dev[IFNAMSIZ]; }; struct arpreq_old { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ + struct sockaddr arp_pa; /* protocol address */ + struct sockaddr arp_ha; /* hardware address */ + int arp_flags; /* flags */ + struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ }; /* ARP Flag values. */ |