From 7bf6beaf1486e20f44dc43bd3f619f331b63a716 Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Tue, 11 Dec 2012 13:31:26 +1030 Subject: [PATCH] Throttle network scans some more --- overlay_mdp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/overlay_mdp.c b/overlay_mdp.c index bd5a285c..ee13c354 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -876,8 +876,11 @@ static void overlay_mdp_scan(struct sched_ent *alarm) .sin_port=htons(PORT_DNA), }; struct scan_state *state = (struct scan_state *)alarm; + uint32_t stop = state->last; + if (stop - state->current > 25) + stop = state->current+25; - while(state->current <= state->last){ + while(state->current <= stop){ addr.sin_addr.s_addr=htonl(state->current); if (addr.sin_addr.s_addr != state->interface->address.sin_addr.s_addr){ if (overlay_send_probe(NULL, addr, state->interface))