diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 8 |
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 | } |