[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F90F26B.3090906@parallels.com>
Date: Fri, 20 Apr 2012 09:21:47 +0400
From: Pavel Emelyanov <xemul@...allels.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
CC: David Miller <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Gao feng <gaofeng@...fujitsu.com>,
"pablo@...filter.org" <pablo@...filter.org>,
Stephen Hemminger <shemminger@...tta.com>
Subject: Re: [PATCH net-next 12/19] net neighbour: Convert to use register_net_sysctl
> @@ -2925,19 +2924,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
> {
> struct neigh_sysctl_table *t;
> const char *dev_name_source = NULL;
> -
> -#define NEIGH_CTL_PATH_ROOT 0
> -#define NEIGH_CTL_PATH_PROTO 1
> -#define NEIGH_CTL_PATH_NEIGH 2
> -#define NEIGH_CTL_PATH_DEV 3
> -
> - struct ctl_path neigh_path[] = {
> - { .procname = "net", },
> - { .procname = "proto", },
> - { .procname = "neigh", },
> - { .procname = "default", },
> - { },
> - };
> + char neigh_path[ sizeof("net//neigh/") + IFNAMSIZ + IFNAMSIZ ];
Why two IFNAMSIZ-es? One is for the dev->name, but the other one is not.
Is it just for not having any other better constant at hands?
> t = kmemdup(&neigh_sysctl_template, sizeof(*t), GFP_KERNEL);
> if (!t)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists