--- zzzz-none-000/linux-2.6.19.2/net/ipv6/route.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/net/ipv6/route.c 2007-01-19 14:42:56.000000000 +0000 @@ -308,7 +308,7 @@ /* * Default Router Selection (RFC 2461 6.3.6) */ -static int inline rt6_check_dev(struct rt6_info *rt, int oif) +static inline int rt6_check_dev(struct rt6_info *rt, int oif) { struct net_device *dev = rt->rt6i_dev; if (!oif || dev->ifindex == oif) @@ -319,7 +319,7 @@ return 0; } -static int inline rt6_check_neigh(struct rt6_info *rt) +static inline int rt6_check_neigh(struct rt6_info *rt) { struct neighbour *neigh = rt->rt6i_nexthop; int m = 0; @@ -330,8 +330,6 @@ read_lock_bh(&neigh->lock); if (neigh->nud_state & NUD_VALID) m = 2; - else if (!(neigh->nud_state & NUD_FAILED)) - m = 1; read_unlock_bh(&neigh->lock); } return m; @@ -349,7 +347,9 @@ m |= IPV6_DECODE_PREF(IPV6_EXTRACT_PREF(rt->rt6i_flags)) << 2; #endif n = rt6_check_neigh(rt); - if (!n && (strict & RT6_LOOKUP_F_REACHABLE)) + if (n > 1) + m |= 16; + else if (!n && strict & RT6_LOOKUP_F_REACHABLE) return -1; return m; } @@ -380,11 +380,10 @@ continue; if (m > mpri) { - if (strict & RT6_LOOKUP_F_REACHABLE) - rt6_probe(match); + rt6_probe(match); match = rt; mpri = m; - } else if (strict & RT6_LOOKUP_F_REACHABLE) { + } else { rt6_probe(rt); } } @@ -637,7 +636,7 @@ int strict = 0; int attempts = 3; int err; - int reachable = ipv6_devconf.forwarding ? 0 : RT6_LOOKUP_F_REACHABLE; + int reachable = RT6_LOOKUP_F_REACHABLE; strict |= flags & RT6_LOOKUP_F_IFACE; @@ -734,7 +733,7 @@ int strict = 0; int attempts = 3; int err; - int reachable = ipv6_devconf.forwarding ? 0 : RT6_LOOKUP_F_REACHABLE; + int reachable = RT6_LOOKUP_F_REACHABLE; strict |= flags & RT6_LOOKUP_F_IFACE;