summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/net/ipv4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c
index 6b78ad77..4c1393f2 100644
--- a/src/net/ipv4.c
+++ b/src/net/ipv4.c
@@ -118,6 +118,8 @@ static struct ipv4_miniroute * ipv4_route ( struct in_addr *dest ) {
/* Find first usable route in routing table */
list_for_each_entry ( miniroute, &ipv4_miniroutes, list ) {
+ if ( ! ( miniroute->netdev->state & NETDEV_OPEN ) )
+ continue;
local = ( ( ( dest->s_addr ^ miniroute->address.s_addr )
& miniroute->netmask.s_addr ) == 0 );
has_gw = ( miniroute->gateway.s_addr );