diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 6 | ||||
-rw-r--r-- | net/ipv4/fib_frontend.c | 7 |
2 files changed, 3 insertions, 10 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 6a5e6e4b142c..adf273f8ad2e 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1147,12 +1147,8 @@ static int inetdev_event(struct notifier_block *this, unsigned long event, | |||
1147 | void *ptr) | 1147 | void *ptr) |
1148 | { | 1148 | { |
1149 | struct net_device *dev = ptr; | 1149 | struct net_device *dev = ptr; |
1150 | struct in_device *in_dev; | 1150 | struct in_device *in_dev = __in_dev_get_rtnl(dev); |
1151 | |||
1152 | if (event == NETDEV_UNREGISTER_FINAL) | ||
1153 | goto out; | ||
1154 | 1151 | ||
1155 | in_dev = __in_dev_get_rtnl(dev); | ||
1156 | ASSERT_RTNL(); | 1152 | ASSERT_RTNL(); |
1157 | 1153 | ||
1158 | if (!in_dev) { | 1154 | if (!in_dev) { |
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index fd7d9ae64f16..acdee325d972 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -1050,9 +1050,6 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo | |||
1050 | return NOTIFY_DONE; | 1050 | return NOTIFY_DONE; |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | if (event == NETDEV_UNREGISTER_FINAL) | ||
1054 | return NOTIFY_DONE; | ||
1055 | |||
1056 | in_dev = __in_dev_get_rtnl(dev); | 1053 | in_dev = __in_dev_get_rtnl(dev); |
1057 | 1054 | ||
1058 | switch (event) { | 1055 | switch (event) { |
@@ -1064,14 +1061,14 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo | |||
1064 | fib_sync_up(dev); | 1061 | fib_sync_up(dev); |
1065 | #endif | 1062 | #endif |
1066 | atomic_inc(&net->ipv4.dev_addr_genid); | 1063 | atomic_inc(&net->ipv4.dev_addr_genid); |
1067 | rt_cache_flush(dev_net(dev), -1); | 1064 | rt_cache_flush(net, -1); |
1068 | break; | 1065 | break; |
1069 | case NETDEV_DOWN: | 1066 | case NETDEV_DOWN: |
1070 | fib_disable_ip(dev, 0, 0); | 1067 | fib_disable_ip(dev, 0, 0); |
1071 | break; | 1068 | break; |
1072 | case NETDEV_CHANGEMTU: | 1069 | case NETDEV_CHANGEMTU: |
1073 | case NETDEV_CHANGE: | 1070 | case NETDEV_CHANGE: |
1074 | rt_cache_flush(dev_net(dev), 0); | 1071 | rt_cache_flush(net, 0); |
1075 | break; | 1072 | break; |
1076 | } | 1073 | } |
1077 | return NOTIFY_DONE; | 1074 | return NOTIFY_DONE; |