diff mbox

[net-next,1/3] netconf: rename PROXY_ARP to NEIGH_PROXY

Message ID 20131217223552.60d1f5cb@nehalam.linuxnetplumber.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Hemminger Dec. 18, 2013, 6:35 a.m. UTC
Use same field for both IPv4 (proxy_arp) and IPv6 (proxy_ndp)
so fix it before API is set to be a common name

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

---
 include/uapi/linux/netconf.h |    2 +-
 net/ipv4/devinet.c           |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jamal Hadi Salim Dec. 18, 2013, 5:06 p.m. UTC | #1
On 12/18/13 01:35, Stephen Hemminger wrote:
> Use same field for both IPv4 (proxy_arp) and IPv6 (proxy_ndp)
> so fix it before API is set to be a common name
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
> ---
>   include/uapi/linux/netconf.h |    2 +-
>   net/ipv4/devinet.c           |   10 +++++-----
>   2 files changed, 6 insertions(+), 6 deletions(-)
>
> --- a/include/uapi/linux/netconf.h	2013-12-17 22:30:00.000000000 -0800
> +++ b/include/uapi/linux/netconf.h	2013-12-17 22:31:07.973419694 -0800
> @@ -14,7 +14,7 @@ enum {
>   	NETCONFA_FORWARDING,
>   	NETCONFA_RP_FILTER,
>   	NETCONFA_MC_FORWARDING,
> -	NETCONFA_PROXY_ARP,
> +	NETCONFA_PROXY_NEIGH,
>   	__NETCONFA_MAX
>   };

Can you do this? ;-> Why not #define NETCONFA_PROXY_NEIGH to be 
NETCONFA_PROXY_ARP

cheers,
jamal

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Hemminger Dec. 18, 2013, 6:06 p.m. UTC | #2
On Wed, 18 Dec 2013 12:06:45 -0500
Jamal Hadi Salim <jhs@mojatatu.com> wrote:

> On 12/18/13 01:35, Stephen Hemminger wrote:
> > Use same field for both IPv4 (proxy_arp) and IPv6 (proxy_ndp)
> > so fix it before API is set to be a common name
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > ---
> >   include/uapi/linux/netconf.h |    2 +-
> >   net/ipv4/devinet.c           |   10 +++++-----
> >   2 files changed, 6 insertions(+), 6 deletions(-)
> >
> > --- a/include/uapi/linux/netconf.h	2013-12-17 22:30:00.000000000 -0800
> > +++ b/include/uapi/linux/netconf.h	2013-12-17 22:31:07.973419694 -0800
> > @@ -14,7 +14,7 @@ enum {
> >   	NETCONFA_FORWARDING,
> >   	NETCONFA_RP_FILTER,
> >   	NETCONFA_MC_FORWARDING,
> > -	NETCONFA_PROXY_ARP,
> > +	NETCONFA_PROXY_NEIGH,
> >   	__NETCONFA_MAX
> >   };
> 
> Can you do this? ;-> Why not #define NETCONFA_PROXY_NEIGH to be 
> NETCONFA_PROXY_ARP
> 
> cheers,
> jamal
> 

The patch is against un-released net-next and only changes something
that was just added.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nicolas Dichtel Dec. 20, 2013, 10:02 a.m. UTC | #3
Le 18/12/2013 07:35, Stephen Hemminger a écrit :
> Use same field for both IPv4 (proxy_arp) and IPv6 (proxy_ndp)
> so fix it before API is set to be a common name
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Dec. 22, 2013, 11:03 p.m. UTC | #4
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 17 Dec 2013 22:35:52 -0800

> Use same field for both IPv4 (proxy_arp) and IPv6 (proxy_ndp)
> so fix it before API is set to be a common name
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/include/uapi/linux/netconf.h	2013-12-17 22:30:00.000000000 -0800
+++ b/include/uapi/linux/netconf.h	2013-12-17 22:31:07.973419694 -0800
@@ -14,7 +14,7 @@  enum {
 	NETCONFA_FORWARDING,
 	NETCONFA_RP_FILTER,
 	NETCONFA_MC_FORWARDING,
-	NETCONFA_PROXY_ARP,
+	NETCONFA_PROXY_NEIGH,
 	__NETCONFA_MAX
 };
 #define NETCONFA_MAX	(__NETCONFA_MAX - 1)
--- a/net/ipv4/devinet.c	2013-12-17 22:30:00.000000000 -0800
+++ b/net/ipv4/devinet.c	2013-12-17 22:31:07.973419694 -0800
@@ -1696,7 +1696,7 @@  static int inet_netconf_msgsize_devconf(
 		size += nla_total_size(4);
 	if (type == -1 || type == NETCONFA_MC_FORWARDING)
 		size += nla_total_size(4);
-	if (type == -1 || type == NETCONFA_PROXY_ARP)
+	if (type == -1 || type == NETCONFA_PROXY_NEIGH)
 		size += nla_total_size(4);
 
 	return size;
@@ -1734,8 +1734,8 @@  static int inet_netconf_fill_devconf(str
 	    nla_put_s32(skb, NETCONFA_MC_FORWARDING,
 			IPV4_DEVCONF(*devconf, MC_FORWARDING)) < 0)
 		goto nla_put_failure;
-	if ((type == -1 || type == NETCONFA_PROXY_ARP) &&
-	    nla_put_s32(skb, NETCONFA_PROXY_ARP,
+	if ((type == -1 || type == NETCONFA_PROXY_NEIGH) &&
+	    nla_put_s32(skb, NETCONFA_PROXY_NEIGH,
 			IPV4_DEVCONF(*devconf, PROXY_ARP)) < 0)
 		goto nla_put_failure;
 
@@ -1775,7 +1775,7 @@  static const struct nla_policy devconf_i
 	[NETCONFA_IFINDEX]	= { .len = sizeof(int) },
 	[NETCONFA_FORWARDING]	= { .len = sizeof(int) },
 	[NETCONFA_RP_FILTER]	= { .len = sizeof(int) },
-	[NETCONFA_PROXY_ARP]	= { .len = sizeof(int) },
+	[NETCONFA_PROXY_NEIGH]	= { .len = sizeof(int) },
 };
 
 static int inet_netconf_get_devconf(struct sk_buff *in_skb,
@@ -2002,7 +2002,7 @@  static int devinet_conf_proc(struct ctl_
 		if (i == IPV4_DEVCONF_PROXY_ARP - 1 &&
 		    new_value != old_value) {
 			ifindex = devinet_conf_ifindex(net, cnf);
-			inet_netconf_notify_devconf(net, NETCONFA_PROXY_ARP,
+			inet_netconf_notify_devconf(net, NETCONFA_PROXY_NEIGH,
 						    ifindex, cnf);
 		}
 	}