summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-07-14 20:19:59 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2004-07-14 20:19:59 +0000
commit4abec11fc5807816f40197c3cd11017edec635c8 (patch)
treecfb1ef6f9a476c1b4f6c29c5752383dfbd35f6cb /sys
parentaf269e45b655d42d9dec4a8a6abab8572f4ef3a9 (diff)
completely revert to r1.31, there were still problems on the forwarding
path
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/ip6_forward.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index eaea4690d38..fb032ed174f 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_forward.c,v 1.33 2004/07/12 00:50:22 itojun Exp $ */
+/* $OpenBSD: ip6_forward.c,v 1.34 2004/07/14 20:19:58 dhartmei Exp $ */
/* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */
/*
@@ -435,27 +435,22 @@ ip6_forward(m, srcrt)
}
if (m == NULL)
goto senderr;
+
+ ip6 = mtod(m, struct ip6_hdr *);
#endif
-#if NPF > 0
- for (; m; m = m->m_nextpkt)
-#else
- if (1)
-#endif
- {
- error = nd6_output(rt->rt_ifp, origifp, m, dst, rt);
- if (error) {
- in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
- ip6stat.ip6s_cantforward++;
- } else {
- ip6stat.ip6s_forward++;
- in6_ifstat_inc(rt->rt_ifp, ifs6_out_forward);
- if (type)
- ip6stat.ip6s_redirectsent++;
- else {
- if (mcopy)
- goto freecopy;
- }
+ error = nd6_output(rt->rt_ifp, origifp, m, dst, rt);
+ if (error) {
+ in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
+ ip6stat.ip6s_cantforward++;
+ } else {
+ ip6stat.ip6s_forward++;
+ in6_ifstat_inc(rt->rt_ifp, ifs6_out_forward);
+ if (type)
+ ip6stat.ip6s_redirectsent++;
+ else {
+ if (mcopy)
+ goto freecopy;
}
}