diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2009-04-05 14:01:39 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2009-04-05 14:01:39 +0000 |
commit | 38ae65235e00a1e87239372f973d057aeff1f2d8 (patch) | |
tree | 941da68a6a83f1d57f1b0b6cf171466b57b6d190 /sbin/routed/table.c | |
parent | 3b3e61faa1eed8e917926c8c74a4acbe709e1dd2 (diff) | |
download | src-38ae65235e00a1e87239372f973d057aeff1f2d8.tar.gz src-38ae65235e00a1e87239372f973d057aeff1f2d8.zip |
Use <sys/queue.h> to manage the interface list.
Notes
Notes:
svn path=/head/; revision=190711
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 9fd4cb816a1c..7e30ebd1595c 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; |