Fix SIGSEGV when set_short_delay() is called when ifi->ifi_ra_timer is NULL.

This can happen in a short period when a prefix is changed by a rtmsg and a
new interface arrives.
This commit is contained in:
Hiroki Sato 2013-03-06 04:58:48 +00:00
parent 067041766e
commit 833d853cbf

View File

@ -1008,6 +1008,8 @@ set_short_delay(struct ifinfo *ifi)
long delay; /* must not be greater than 1000000 */
struct timeval interval, now, min_delay, tm_tmp, *rest;
if (ifi->ifi_ra_timer == NULL)
return;
/*
* Compute a random delay. If the computed value
* corresponds to a time later than the time the next