diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-01-07 08:14:15 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-07 08:14:15 -0500 |
commit | 1c2a48cf65580a276552151eb8f78d78c55b828e (patch) | |
tree | 68ed0628a276b33cb5aa0ad4899c1afe0a33a69d /net/ipv4/route.c | |
parent | 0aa002fe602939370e9476e5ec32b562000a0425 (diff) | |
parent | cb600d2f83c854ec3d6660063e4466431999489b (diff) |
Merge branch 'linus' into x86/apic-cleanups
Conflicts:
arch/x86/include/asm/io_apic.h
Merge reason: Resolve the conflict, update to a more recent -rc base
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 987bf9adb318..93bfd95584f4 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2585,9 +2585,10 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, | |||
2585 | goto out; | 2585 | goto out; |
2586 | 2586 | ||
2587 | /* RACE: Check return value of inet_select_addr instead. */ | 2587 | /* RACE: Check return value of inet_select_addr instead. */ |
2588 | if (rcu_dereference(dev_out->ip_ptr) == NULL) | 2588 | if (!(dev_out->flags & IFF_UP) || !__in_dev_get_rcu(dev_out)) { |
2589 | goto out; /* Wrong error code */ | 2589 | err = -ENETUNREACH; |
2590 | 2590 | goto out; | |
2591 | } | ||
2591 | if (ipv4_is_local_multicast(oldflp->fl4_dst) || | 2592 | if (ipv4_is_local_multicast(oldflp->fl4_dst) || |
2592 | ipv4_is_lbcast(oldflp->fl4_dst)) { | 2593 | ipv4_is_lbcast(oldflp->fl4_dst)) { |
2593 | if (!fl.fl4_src) | 2594 | if (!fl.fl4_src) |
@@ -2648,8 +2649,12 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp, | |||
2648 | } | 2649 | } |
2649 | 2650 | ||
2650 | if (res.type == RTN_LOCAL) { | 2651 | if (res.type == RTN_LOCAL) { |
2651 | if (!fl.fl4_src) | 2652 | if (!fl.fl4_src) { |
2652 | fl.fl4_src = fl.fl4_dst; | 2653 | if (res.fi->fib_prefsrc) |
2654 | fl.fl4_src = res.fi->fib_prefsrc; | ||
2655 | else | ||
2656 | fl.fl4_src = fl.fl4_dst; | ||
2657 | } | ||
2653 | dev_out = net->loopback_dev; | 2658 | dev_out = net->loopback_dev; |
2654 | fl.oif = dev_out->ifindex; | 2659 | fl.oif = dev_out->ifindex; |
2655 | res.fi = NULL; | 2660 | res.fi = NULL; |