Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171610
b: refs/heads/master
c: e2ce146
h: refs/heads/master
v: v3
  • Loading branch information
Octavian Purdila authored and David S. Miller committed Nov 18, 2009
1 parent 96a77a6 commit d0f8dd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 395264d509aec45149745843d9a737140a1ece16
refs/heads/master: e2ce146848c81af2f6d42e67990191c284bf0c33
11 changes: 6 additions & 5 deletions trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,11 @@ static void nl_fib_lookup_exit(struct net *net)
net->ipv4.fibnl = NULL;
}

static void fib_disable_ip(struct net_device *dev, int force)
static void fib_disable_ip(struct net_device *dev, int force, int delay)
{
if (fib_sync_down_dev(dev, force))
fib_flush(dev_net(dev));
rt_cache_flush(dev_net(dev), 0);
rt_cache_flush(dev_net(dev), delay);
arp_ifdown(dev);
}

Expand All @@ -922,7 +922,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
/* Last address was deleted from this interface.
Disable IP.
*/
fib_disable_ip(dev, 1);
fib_disable_ip(dev, 1, 0);
} else {
rt_cache_flush(dev_net(dev), -1);
}
Expand All @@ -937,7 +937,7 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
struct in_device *in_dev = __in_dev_get_rtnl(dev);

if (event == NETDEV_UNREGISTER) {
fib_disable_ip(dev, 2);
fib_disable_ip(dev, 2, -1);
return NOTIFY_DONE;
}

Expand All @@ -955,10 +955,11 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
rt_cache_flush(dev_net(dev), -1);
break;
case NETDEV_DOWN:
fib_disable_ip(dev, 0);
fib_disable_ip(dev, 0, 0);
break;
case NETDEV_CHANGEMTU:
case NETDEV_CHANGE:
case NETDEV_UNREGISTER_PERNET:
rt_cache_flush(dev_net(dev), 0);
break;
}
Expand Down

0 comments on commit d0f8dd8

Please sign in to comment.