diff options
author | David S. Miller <davem@davemloft.net> | 2010-12-27 07:37:05 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-27 07:37:05 +0100 |
commit | 17f7f4d9fcce8f1b75b5f735569309dee7665968 (patch) | |
tree | 14d7e49ca0053a0fcab3c33b5023bf3f90c5c08a /net/ipv4/route.c | |
parent | Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher... (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-17f7f4d9fcce8f1b75b5f735569309dee7665968.tar.xz linux-17f7f4d9fcce8f1b75b5f735569309dee7665968.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/ipv4/fib_frontend.c
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index d8b4f4d0d66e..f1defb7d88e8 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2562,9 +2562,10 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, goto out; /* RACE: Check return value of inet_select_addr instead. */ - if (rcu_dereference(dev_out->ip_ptr) == NULL) - goto out; /* Wrong error code */ - + if (!(dev_out->flags & IFF_UP) || !__in_dev_get_rcu(dev_out)) { + err = -ENETUNREACH; + goto out; + } if (ipv4_is_local_multicast(oldflp->fl4_dst) || ipv4_is_lbcast(oldflp->fl4_dst)) { if (!fl.fl4_src) |