aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/route.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 987bf9adb318..df948b0f1ac9 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)