Skip to content

Commit 88f6432

Browse files
Julian Anastasovdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Julian Anastasov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 48fb6b5 commit 88f6432

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/ipv4/fib_semantics.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,15 @@ static int fib_detect_death(struct fib_info *fi, int order,
438438
if (n) {
439439
state = n->nud_state;
440440
neigh_release(n);
441+
} else {
442+
return 0;
441443
}
442444
if (state == NUD_REACHABLE)
443445
return 0;
444446
if ((state & NUD_VALID) && order != dflt)
445447
return 0;
446448
if ((state & NUD_VALID) ||
447-
(*last_idx < 0 && order > dflt)) {
449+
(*last_idx < 0 && order > dflt && state != NUD_INCOMPLETE)) {
448450
*last_resort = fi;
449451
*last_idx = order;
450452
}

0 commit comments

Comments
 (0)