summaryrefslogtreecommitdiffstats
path: root/sbin/routed/rdisc.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2009-04-05 14:01:39 +0000
committerphk <phk@FreeBSD.org>2009-04-05 14:01:39 +0000
commit8c0066c04042edc19879610fab48e9dbde8014c5 (patch)
tree941da68a6a83f1d57f1b0b6cf171466b57b6d190 /sbin/routed/rdisc.c
parente48abfcaf0db4b971f5b49e08c0cc2d1b470e460 (diff)
downloadFreeBSD-src-8c0066c04042edc19879610fab48e9dbde8014c5.zip
FreeBSD-src-8c0066c04042edc19879610fab48e9dbde8014c5.tar.gz
Use <sys/queue.h> to manage the interface list.
Diffstat (limited to 'sbin/routed/rdisc.c')
-rw-r--r--sbin/routed/rdisc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/routed/rdisc.c b/sbin/routed/rdisc.c
index 496f212..8452650 100644
--- a/sbin/routed/rdisc.c
+++ b/sbin/routed/rdisc.c
@@ -278,7 +278,7 @@ set_supplier(void)
/* Switch router discovery multicast groups from soliciting
* to advertising.
*/
- for (ifp = ifnet; ifp; ifp = ifp->int_next) {
+ LIST_FOREACH(ifp, &ifnet, int_list) {
if (ifp->int_state & IS_BROKE)
continue;
ifp->int_rdisc_cnt = 0;
@@ -817,7 +817,7 @@ rdisc_adv(void)
rdisc_timer.tv_sec = now.tv_sec + NEVER;
- for (ifp = ifnet; ifp; ifp = ifp->int_next) {
+ LIST_FOREACH(ifp, &ifnet, int_list) {
if (0 != (ifp->int_state & (IS_NO_ADV_OUT | IS_BROKE)))
continue;
@@ -859,7 +859,7 @@ rdisc_sol(void)
rdisc_timer.tv_sec = now.tv_sec + NEVER;
- for (ifp = ifnet; ifp; ifp = ifp->int_next) {
+ LIST_FOREACH(ifp, &ifnet, int_list) {
if (0 != (ifp->int_state & (IS_NO_SOL_OUT | IS_BROKE))
|| ifp->int_rdisc_cnt >= MAX_SOLICITATIONS)
continue;
OpenPOWER on IntegriCloud