svn commit: r295737 - head/usr.sbin/rtsold
Mark Johnston
markj at FreeBSD.org
Thu Feb 18 01:58:27 UTC 2016
Author: markj
Date: Thu Feb 18 01:58:26 2016
New Revision: 295737
URL: https://svnweb.freebsd.org/changeset/base/295737
Log:
Use the _SAFE loop variant, since the loop body may remove queue entries.
PR: 207146
MFC after: 3 days
Modified:
head/usr.sbin/rtsold/rtsold.c
Modified: head/usr.sbin/rtsold/rtsold.c
==============================================================================
--- head/usr.sbin/rtsold/rtsold.c Thu Feb 18 01:30:49 2016 (r295736)
+++ head/usr.sbin/rtsold/rtsold.c Thu Feb 18 01:58:26 2016 (r295737)
@@ -554,7 +554,7 @@ rtsol_check_timer(void)
struct timespec now, rtsol_timer;
struct ifinfo *ifi;
struct rainfo *rai;
- struct ra_opt *rao;
+ struct ra_opt *rao, *raotmp;
int flags;
clock_gettime(CLOCK_MONOTONIC_FAST, &now);
@@ -649,7 +649,8 @@ rtsol_check_timer(void)
int expire = 0;
TAILQ_FOREACH(rai, &ifi->ifi_rainfo, rai_next) {
- TAILQ_FOREACH(rao, &rai->rai_ra_opt, rao_next) {
+ TAILQ_FOREACH_SAFE(rao, &rai->rai_ra_opt,
+ rao_next, raotmp) {
warnmsg(LOG_DEBUG, __func__,
"RA expiration timer: "
"type=%d, msg=%s, expire=%s",
More information about the svn-src-all
mailing list