Skip to contentSkip to conversation

ipv4: be more aggressive when probing alternative gateways

PATCH Applied Julian Anastasov 2 participants 2 messages Jul 23, 2015 – Jul 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/ipv4/fib_semantics.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/ipv4/fib_semantics.c +3 -1
index 6754c64..d4c6732 100644
@@ -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;
 	}
Signature · 1 line
1.9.3