Message ID | 20180921103930.1420679-3-Haakon.Bugge@oracle.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Series | net: if_arp: use define instead of hard-coded value | expand |
On Fri, 21 Sep 2018 12:39:30 +0200 Håkon Bugge <Haakon.Bugge@oracle.com> wrote: > uapi/linux/if_arp.h includes linux/netdevice.h, which uses > IFNAMSIZ. Hence, use it instead of hard-coded value. > > Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> I tested build of iproute2 with updated header and there is no issue. Tested-by: Stephen Hemminger <stephen@networkplumber.org>
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index b68b4b3d9172..c3cc5a9e5eaf 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h @@ -118,7 +118,7 @@ struct arpreq { struct sockaddr arp_ha; /* hardware address */ int arp_flags; /* flags */ struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ - char arp_dev[16]; + char arp_dev[IFNAMSIZ]; }; struct arpreq_old {
uapi/linux/if_arp.h includes linux/netdevice.h, which uses IFNAMSIZ. Hence, use it instead of hard-coded value. Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> --- include/uapi/linux/if_arp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)