}
}
- event_add(event, &(struct timeval){pingtimeout, 0});
+ event_add(event, &(struct timeval){pingtimeout, rand() % 100000});
}
static void periodic_handler(int fd, short events, void *event) {
}
}
- event_add(event, &(struct timeval){5, 0});
+ event_add(event, &(struct timeval){5, rand() % 100000});
}
void handle_meta_connection_data(int fd, short events, void *data) {
struct event periodic_event;
timeout_set(&timeout_event, timeout_handler, &timeout_event);
- event_add(&timeout_event, &(struct timeval){pingtimeout, 0});
+ event_add(&timeout_event, &(struct timeval){pingtimeout, rand() % 100000});
timeout_set(&periodic_event, periodic_handler, &periodic_event);
- event_add(&periodic_event, &(struct timeval){5, 0});
+ event_add(&periodic_event, &(struct timeval){5, rand() % 100000});
#ifndef HAVE_MINGW
struct event sighup_event;
}
end:
- event_add(&n->mtuevent, &(struct timeval){timeout, 0});
+ event_add(&n->mtuevent, &(struct timeval){timeout, rand() % 100000});
}
void send_mtu_probe(node_t *n) {
timeout_set(&keyexpire_event, keyexpire_handler, NULL);
}
- event_add(&keyexpire_event, &(struct timeval){keylifetime, 0});
+ event_add(&keyexpire_event, &(struct timeval){keylifetime, rand() % 100000});
}
/*
outgoing->timeout = maxtimeout;
timeout_set(&outgoing->ev, retry_outgoing_handler, outgoing);
- event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, 0});
+ event_add(&outgoing->ev, &(struct timeval){outgoing->timeout, rand() % 100000});
logger(DEBUG_CONNECTIONS, LOG_NOTICE,
"Trying to re-establish outgoing connection in %d seconds",
new->request = xstrdup(request);
new->firstseen = time(NULL);
splay_insert(past_request_tree, new);
- event_add(&past_request_event, &(struct timeval){10, 0});
+ event_add(&past_request_event, &(struct timeval){10, rand() % 100000});
return false;
}
}
deleted, left);
if(left)
- event_add(&past_request_event, &(struct timeval){10, 0});
+ event_add(&past_request_event, &(struct timeval){10, rand() % 100000});
}
void init_requests(void) {
}
if(left)
- event_add(&age_subnets_event, &(struct timeval){10, 0});
+ event_add(&age_subnets_event, &(struct timeval){10, rand() % 100000});
}
static void learn_mac(mac_t *address) {
if(!timeout_initialized(&age_subnets_event))
timeout_set(&age_subnets_event, age_subnets, NULL);
- event_add(&age_subnets_event, &(struct timeval){10, 0});
+ event_add(&age_subnets_event, &(struct timeval){10, rand() % 100000});
} else {
if(subnet->expires)
subnet->expires = time(NULL) + macexpire;