summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rtadvd
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2013-03-06 04:58:48 +0000
committerhrs <hrs@FreeBSD.org>2013-03-06 04:58:48 +0000
commit684b694dcf968ef21f89f23aaba4ea102df252bc (patch)
tree7192bbc8f4d2f9f6c22eaf6634c602e7dc05ddd0 /usr.sbin/rtadvd
parentf89a924f2dfcf30de9e7be9ddc2952b19cf5eed3 (diff)
downloadFreeBSD-src-684b694dcf968ef21f89f23aaba4ea102df252bc.zip
FreeBSD-src-684b694dcf968ef21f89f23aaba4ea102df252bc.tar.gz
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.
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r--usr.sbin/rtadvd/rtadvd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 4d2a527..880b283 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -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
OpenPOWER on IntegriCloud