diff options
author | Julian Anastasov <ja@ssi.bg> | 2015-07-23 07:39:35 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-27 03:56:27 (GMT) |
commit | 88f643203668b95b884b60b45ff182289153843c (patch) | |
tree | 7c07eec1dcbf5d2b09d53bf1b267edef40b2a9cb /net/ipv4/fib_semantics.c | |
parent | 48fb6b554501914b6befcf9b38292cbeb91de330 (diff) | |
download | linux-88f643203668b95b884b60b45ff182289153843c.tar.xz |
ipv4: be more aggressive when probing alternative gateways
Currently, we do not notice if new alternative gateways
are added. We can do it by checking for present neigh
entry. Also, gateways that are currently probed (NUD_INCOMPLETE)
can be skipped from round-robin probing.
Suggested-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_semantics.c')
-rw-r--r-- | net/ipv4/fib_semantics.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 6754c64..d4c6732 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -438,13 +438,15 @@ static int fib_detect_death(struct fib_info *fi, int order, if (n) { state = n->nud_state; neigh_release(n); + } else { + return 0; } if (state == NUD_REACHABLE) return 0; if ((state & NUD_VALID) && order != dflt) return 0; if ((state & NUD_VALID) || - (*last_idx < 0 && order > dflt)) { + (*last_idx < 0 && order > dflt && state != NUD_INCOMPLETE)) { *last_resort = fi; *last_idx = order; } |