summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2003-12-21 14:57:20 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2003-12-21 14:57:20 +0000
commit4305e8e49b42418eedda090cbce276f87113e69f (patch)
tree461c4156550866e5cde4ae82a8d5c729fa96ad82 /sys/netinet6
parent6aa7ecedc0a203bcc56e2e1c2e33b99c0a601942 (diff)
use CIRCLEQ* for pcb's; ok deraadt, henning, mcbride, with help from canacar
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/icmp6.c7
-rw-r--r--sys/netinet6/in6_pcb.c8
-rw-r--r--sys/netinet6/raw_ip6.c7
3 files changed, 8 insertions, 14 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 91295bfbf8a..64e36b19772 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.75 2003/10/01 21:41:05 itojun Exp $ */
+/* $OpenBSD: icmp6.c,v 1.76 2003/12/21 14:57:19 markus Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -1907,10 +1907,7 @@ icmp6_rip6_input(mp, off)
/* KAME hack: recover scopeid */
(void)in6_recoverscope(&rip6src, &ip6->ip6_src, m->m_pkthdr.rcvif);
- for (in6p = rawin6pcbtable.inpt_queue.cqh_first;
- in6p != (struct inpcb *)&rawin6pcbtable.inpt_queue;
- in6p = in6p->inp_queue.cqe_next)
- {
+ CIRCLEQ_FOREACH(in6p, &rawin6pcbtable.inpt_queue, inp_queue) {
if (!(in6p->in6p_flags & INP_IPV6))
continue;
if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6)
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index b11faf5aeac..34f78a97e96 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.38 2003/11/04 22:39:38 markus Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.39 2003/12/21 14:57:19 markus Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -593,9 +593,9 @@ in6_pcbnotify(head, dst, fport_arg, src, lport_arg, cmd, cmdarg, notify)
}
errno = inet6ctlerrmap[cmd];
- for (inp = head->inpt_queue.cqh_first;
- inp != (struct inpcb *)&head->inpt_queue; inp = ninp) {
- ninp = inp->inp_queue.cqe_next;
+ for (inp = CIRCLEQ_FIRST(&head->inpt_queue);
+ inp != CIRCLEQ_END(&head->inpt_queue); inp = ninp) {
+ ninp = CIRCLEQ_NEXT(inp, inp_queue);
if ((inp->inp_flags & INP_IPV6) == 0)
continue;
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index 33c8f977f38..1c25d12dccb 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.21 2003/10/01 21:41:05 itojun Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.22 2003/12/21 14:57:19 markus Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -176,10 +176,7 @@ rip6_input(mp, offp, proto)
/* KAME hack: recover scopeid */
(void)in6_recoverscope(&rip6src, &ip6->ip6_src, m->m_pkthdr.rcvif);
- for (in6p = rawin6pcbtable.inpt_queue.cqh_first;
- in6p != (struct inpcb *)&rawin6pcbtable.inpt_queue;
- in6p = in6p->inp_queue.cqe_next)
- {
+ CIRCLEQ_FOREACH(in6p, &rawin6pcbtable.inpt_queue, inp_queue) {
if (!(in6p->in6p_flags & INP_IPV6))
continue;
if (in6p->in6p_ip6.ip6_nxt &&