net: Do not route traffic to interfaces that are not up
In the case when:

  - Board has multiple network interfaces

  - Two ore more of those interfaces are statically configured to be
    on the same network

  - Only one of those interfaces is up and it is preceeded (as far as
    for_each_netdev is concerned) by interface in the same network
    that isn't

net_route() will choose "non-up" device as a route for traffic
resulting in no network connectivity. Change the routing logic to also
consider if interface is "up", so that only such interfaces would be
considered for sending network traffic out.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent dfdac60 commit f0624a701513e5444340e7f071ac875d34b39336
@Andrey Smirnov Andrey Smirnov authored on 21 Aug 2018
Sascha Hauer committed on 22 Aug 2018
Showing 1 changed file
View
net/net.c