aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-02-21 11:53:47 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-26 14:42:56 -0500
commit8030f54499925d073a88c09f30d5d844fb1b3190 (patch)
tree4a5dddb3eff8a6eecf3ac5611c45cbac356f495c /net/ipv4
parent45ba9dd2007da23da5ac21179451c3c9fee30a96 (diff)
[IPV4] devinet: Register inetdev earlier.
This patch allocates inetdev at registration for all devices in line with IPv6. This allows sysctl configuration on the devices to occur before they're brought up or addresses are added. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/devinet.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 8a0ec10a13a7..e10794dc5f64 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1054,12 +1054,14 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1054 ASSERT_RTNL(); 1054 ASSERT_RTNL();
1055 1055
1056 if (!in_dev) { 1056 if (!in_dev) {
1057 if (event == NETDEV_REGISTER && dev == &loopback_dev) { 1057 if (event == NETDEV_REGISTER) {
1058 in_dev = inetdev_init(dev); 1058 in_dev = inetdev_init(dev);
1059 if (!in_dev) 1059 if (!in_dev)
1060 panic("devinet: Failed to create loopback\n"); 1060 panic("devinet: Failed to create loopback\n");
1061 in_dev->cnf.no_xfrm = 1; 1061 if (dev == &loopback_dev) {
1062 in_dev->cnf.no_policy = 1; 1062 in_dev->cnf.no_xfrm = 1;
1063 in_dev->cnf.no_policy = 1;
1064 }
1063 } 1065 }
1064 goto out; 1066 goto out;
1065 } 1067 }