aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-06-05 02:35:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-06-07 16:39:19 -0400
commit31be308541e990592a2d0a3e77e8e51bd0cea0e0 (patch)
tree4b37efef3a38439be092ca269e687706be07f8f1 /include/linux
parent42f811b8bcdf6695bf74de580b1daf53445e8949 (diff)
[IPV4]: Add default config support after inetdev_init
Previously once inetdev_init has been called on a device any changes made to ipv4_devconf_dflt would have no effect on that device's configuration. This creates a problem since we have moved the point where inetdev_init is called from when an address is added to where the device is registered. This patch is the first half of a set that tries to mimic the old behaviour while still calling inetdev_init. It propagates any changes to ipv4_devconf_dflt to those devices that have not had the corresponding attribute set. The next patch will forcibly set all values at the point where inetdev_init was previously called. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/inetdevice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index 1ef174d83e09..40adefdfe5d1 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -3,6 +3,7 @@
3 3
4#ifdef __KERNEL__ 4#ifdef __KERNEL__
5 5
6#include <linux/bitmap.h>
6#include <linux/if.h> 7#include <linux/if.h>
7#include <linux/netdevice.h> 8#include <linux/netdevice.h>
8#include <linux/rcupdate.h> 9#include <linux/rcupdate.h>
@@ -12,6 +13,7 @@ struct ipv4_devconf
12{ 13{
13 void *sysctl; 14 void *sysctl;
14 int data[__NET_IPV4_CONF_MAX - 1]; 15 int data[__NET_IPV4_CONF_MAX - 1];
16 DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
15}; 17};
16 18
17extern struct ipv4_devconf ipv4_devconf; 19extern struct ipv4_devconf ipv4_devconf;
@@ -53,6 +55,7 @@ static inline void ipv4_devconf_set(struct in_device *in_dev, int index,
53 int val) 55 int val)
54{ 56{
55 index--; 57 index--;
58 set_bit(index, in_dev->cnf.state);
56 in_dev->cnf.data[index] = val; 59 in_dev->cnf.data[index] = val;
57} 60}
58 61