diff options
author | hrs <hrs@FreeBSD.org> | 2013-03-06 04:58:48 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2013-03-06 04:58:48 +0000 |
commit | 684b694dcf968ef21f89f23aaba4ea102df252bc (patch) | |
tree | 7192bbc8f4d2f9f6c22eaf6634c602e7dc05ddd0 /usr.sbin | |
parent | f89a924f2dfcf30de9e7be9ddc2952b19cf5eed3 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | usr.sbin/rtadvd/rtadvd.c | 2 |
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 |