aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDaniel Lezcano <dlezcano@fr.ibm.com>2007-09-25 22:16:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:52:14 -0400
commitde3cb747ffac5f2a4a6bb156e7e2fd5229e688e5 (patch)
treefe79764b8093843934c9b9f82f573e7a92cef406 /net/ipv4/devinet.c
parent556829657397b9b05baec6691ead4e22ee8d1567 (diff)
[NET]: Dynamically allocate the loopback device, part 1.
This patch replaces all occurences to the static variable loopback_dev to a pointer loopback_dev. That provides the mindless, trivial, uninteressting change part for the dynamic allocation for the loopback. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Acked-By: Kirill Korotaev <dev@sw.ru> Acked-by: Benjamin Thery <benjamin.thery@bull.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 721b89b60963..affea9b121fc 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -203,7 +203,7 @@ static void inetdev_destroy(struct in_device *in_dev)
203 ASSERT_RTNL(); 203 ASSERT_RTNL();
204 204
205 dev = in_dev->dev; 205 dev = in_dev->dev;
206 if (dev == &loopback_dev) 206 if (dev == loopback_dev)
207 return; 207 return;
208 208
209 in_dev->dead = 1; 209 in_dev->dead = 1;
@@ -1061,7 +1061,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1061 in_dev = inetdev_init(dev); 1061 in_dev = inetdev_init(dev);
1062 if (!in_dev) 1062 if (!in_dev)
1063 return notifier_from_errno(-ENOMEM); 1063 return notifier_from_errno(-ENOMEM);
1064 if (dev == &loopback_dev) { 1064 if (dev == loopback_dev) {
1065 IN_DEV_CONF_SET(in_dev, NOXFRM, 1); 1065 IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
1066 IN_DEV_CONF_SET(in_dev, NOPOLICY, 1); 1066 IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
1067 } 1067 }
@@ -1077,7 +1077,7 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
1077 case NETDEV_UP: 1077 case NETDEV_UP:
1078 if (dev->mtu < 68) 1078 if (dev->mtu < 68)
1079 break; 1079 break;
1080 if (dev == &loopback_dev) { 1080 if (dev == loopback_dev) {
1081 struct in_ifaddr *ifa; 1081 struct in_ifaddr *ifa;
1082 if ((ifa = inet_alloc_ifa()) != NULL) { 1082 if ((ifa = inet_alloc_ifa()) != NULL) {
1083 ifa->ifa_local = 1083 ifa->ifa_local =