Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54716e3b authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller
Browse files

net neigh: Decouple per interface neighbour table controls from binary sysctls



Stop computing the number of neighbour table settings we have by
counting the number of binary sysctls.  This behaviour was silly
and meant that we could not add another neighbour table setting
without also adding another binary sysctl.

Don't pass the binary sysctl path for neighour table entries
into neigh_sysctl_register.  These parameters are no longer
used and so are just dead code.

Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 02291680
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -596,7 +596,6 @@ enum {
	NET_NEIGH_GC_THRESH3=16,
	NET_NEIGH_RETRANS_TIME_MS=17,
	NET_NEIGH_REACHABLE_TIME_MS=18,
	__NET_NEIGH_MAX
};

/* /proc/sys/net/dccp */
+0 −1
Original line number Diff line number Diff line
@@ -251,7 +251,6 @@ extern void neigh_seq_stop(struct seq_file *, void *);

extern int			neigh_sysctl_register(struct net_device *dev, 
						      struct neigh_parms *p,
						      int p_id, int pdev_id,
						      char *p_name,
						      proc_handler *proc_handler);
extern void			neigh_sysctl_unregister(struct neigh_parms *p);
+4 −3
Original line number Diff line number Diff line
@@ -2556,9 +2556,11 @@ EXPORT_SYMBOL(neigh_app_ns);

#ifdef CONFIG_SYSCTL

#define NEIGH_VARS_MAX 19

static struct neigh_sysctl_table {
	struct ctl_table_header *sysctl_header;
	struct ctl_table neigh_vars[__NET_NEIGH_MAX];
	struct ctl_table neigh_vars[NEIGH_VARS_MAX];
	char *dev_name;
} neigh_sysctl_template __read_mostly = {
	.neigh_vars = {
@@ -2675,8 +2677,7 @@ static struct neigh_sysctl_table {
};

int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
			  int p_id, int pdev_id, char *p_name,
			  proc_handler *handler)
			  char *p_name, proc_handler *handler)
{
	struct neigh_sysctl_table *t;
	const char *dev_name_source = NULL;
+1 −2
Original line number Diff line number Diff line
@@ -1284,8 +1284,7 @@ void __init arp_init(void)
	dev_add_pack(&arp_packet_type);
	arp_proc_init();
#ifdef CONFIG_SYSCTL
	neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4,
			      NET_IPV4_NEIGH, "ipv4", NULL);
	neigh_sysctl_register(NULL, &arp_tbl.parms, "ipv4", NULL);
#endif
	register_netdevice_notifier(&arp_netdev_notifier);
}
+1 −2
Original line number Diff line number Diff line
@@ -1487,8 +1487,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)

static void devinet_sysctl_register(struct in_device *idev)
{
	neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4,
			NET_IPV4_NEIGH, "ipv4", NULL);
	neigh_sysctl_register(idev->dev, idev->arp_parms, "ipv4", NULL);
	__devinet_sysctl_register(dev_net(idev->dev), idev->dev->name,
					&idev->cnf);
}
Loading