From: "Håkon Bugge" <Haakon.Bugge@oracle.com>
To: netdev@vger.kernel.org
Cc: stephen@networkplumber.org,
"David S . Miller" <davem@davemloft.net>,
Kate Stewart <kstewart@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] net: if_arp: use define instead of hard-coded value
Date: Tue, 9 Oct 2018 16:27:24 +0200 [thread overview]
Message-ID: <20181009142724.2213012-3-Haakon.Bugge@oracle.com> (raw)
In-Reply-To: <20181009142724.2213012-1-Haakon.Bugge@oracle.com>
Let uapi/linux/if_arp.h include uapi/linux/if.h, where IFNAMSIZ is
defined. Then, use it in this file instead of hard-coded value.
This way, we are using an uapi defined constant, and as such,
user-space should be good.
Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Tested-by: Stephen Hemminger <stephen@networkplumber.org>
---
v1 -> v2:
* Include uapi/linux/if.h
* Add Stephen's t-b
---
include/uapi/linux/if_arp.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h
index b68b4b3d9172..f5d2dab3f610 100644
--- a/include/uapi/linux/if_arp.h
+++ b/include/uapi/linux/if_arp.h
@@ -24,6 +24,7 @@
#ifndef _UAPI_LINUX_IF_ARP_H
#define _UAPI_LINUX_IF_ARP_H
+#include <linux/if.h>
#include <linux/netdevice.h>
/* ARP protocol HARDWARE identifiers. */
@@ -118,7 +119,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 {
--
2.14.3
next prev parent reply other threads:[~2018-10-09 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 14:27 [PATCH v2 0/2] " Håkon Bugge
2018-10-09 14:27 ` [PATCH v2 1/2] net: if_arp: Fix incorrect indents Håkon Bugge
2018-10-09 14:27 ` Håkon Bugge [this message]
2018-10-23 12:30 ` [v2,0/2] net: if_arp: use define instead of hard-coded value Håkon Bugge
2018-10-23 16:11 ` David Miller
2018-10-23 16:31 ` Håkon Bugge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181009142724.2213012-3-Haakon.Bugge@oracle.com \
--to=haakon.bugge@oracle.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=stephen@networkplumber.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®