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:
parent
067041766e
commit
833d853cbf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=247863
@ -1008,6 +1008,8 @@ set_short_delay(struct ifinfo *ifi)
|
|||||||
long delay; /* must not be greater than 1000000 */
|
long delay; /* must not be greater than 1000000 */
|
||||||
struct timeval interval, now, min_delay, tm_tmp, *rest;
|
struct timeval interval, now, min_delay, tm_tmp, *rest;
|
||||||
|
|
||||||
|
if (ifi->ifi_ra_timer == NULL)
|
||||||
|
return;
|
||||||
/*
|
/*
|
||||||
* Compute a random delay. If the computed value
|
* Compute a random delay. If the computed value
|
||||||
* corresponds to a time later than the time the next
|
* corresponds to a time later than the time the next
|
||||||
|
Loading…
Reference in New Issue
Block a user