diff options
author | phk <phk@FreeBSD.org> | 2009-04-05 14:01:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2009-04-05 14:01:39 +0000 |
commit | 8c0066c04042edc19879610fab48e9dbde8014c5 (patch) | |
tree | 941da68a6a83f1d57f1b0b6cf171466b57b6d190 /sbin/routed/table.c | |
parent | e48abfcaf0db4b971f5b49e08c0cc2d1b470e460 (diff) | |
download | FreeBSD-src-8c0066c04042edc19879610fab48e9dbde8014c5.zip FreeBSD-src-8c0066c04042edc19879610fab48e9dbde8014c5.tar.gz |
Use <sys/queue.h> to manage the interface list.
Diffstat (limited to 'sbin/routed/table.c')
-rw-r--r-- | sbin/routed/table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/routed/table.c b/sbin/routed/table.c index 9fd4cb8..7e30ebd1 100644 --- a/sbin/routed/table.c +++ b/sbin/routed/table.c @@ -1918,7 +1918,7 @@ rtbad_sub(struct rt_entry *rt) * If so, see if it is used by any other interfaces, such * as a point-to-point interface with the same local address. */ - for (ifp = ifnet; ifp != 0; ifp = ifp->int_next) { + LIST_FOREACH(ifp, &ifnet, int_list) { /* Retain it if another interface needs it. */ if (ifp->int_addr == rt->rt_ifp->int_addr) { @@ -1935,7 +1935,7 @@ rtbad_sub(struct rt_entry *rt) * interface that justifies it. */ if (rt->rt_state & RS_NET_SYN) { - for (ifp = ifnet; ifp != 0; ifp = ifp->int_next) { + LIST_FOREACH(ifp, &ifnet, int_list) { if ((ifp->int_state & IS_NEED_NET_SYN) && rt->rt_mask == ifp->int_std_mask && rt->rt_dst == ifp->int_std_addr) { @@ -2105,7 +2105,7 @@ age(naddr bad_gate) /* Check for dead IS_REMOTE interfaces by timing their * transmissions. */ - for (ifp = ifnet; ifp; ifp = ifp->int_next) { + LIST_FOREACH(ifp, &ifnet, int_list) { if (!(ifp->int_state & IS_REMOTE)) continue; |