summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2012-11-05 21:49:16 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2012-11-05 21:49:16 +0000
commit6db777a6add6abfd8aae258389ca30934e4553dc (patch)
treef3cb2bdc1ef2453ed70f4ea45ce417ba9437c1e7 /sys/netinet6
parent0a544fe6b28728bcb29f8b945a32f7aaf70abcc8 (diff)
Make sure that in[6]_proto_cksum_out() is called unconditinally and not
inside the NPF block. Fixes checksum issues seen on ramdisk kernels. Initial diff by naddy@, tested and OK by many
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/ip6_forward.c6
-rw-r--r--sys/netinet6/ip6_output.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_forward.c b/sys/netinet6/ip6_forward.c
index f5e6754f4b4..2cb614c2bb7 100644
--- a/sys/netinet6/ip6_forward.c
+++ b/sys/netinet6/ip6_forward.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_forward.c,v 1.55 2012/11/01 07:55:56 henning Exp $ */
+/* $OpenBSD: ip6_forward.c,v 1.56 2012/11/05 21:49:15 claudio Exp $ */
/* $KAME: ip6_forward.c,v 1.75 2001/06/29 12:42:13 jinmei Exp $ */
/*
@@ -361,7 +361,6 @@ reroute:
splx(s);
goto senderr;
}
- in6_proto_cksum_out(m, encif);
ip6 = mtod(m, struct ip6_hdr *);
/*
* PF_TAG_REROUTE handling or not...
@@ -371,6 +370,7 @@ reroute:
* What's the behaviour?
*/
#endif
+ in6_proto_cksum_out(m, encif);
m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */
@@ -471,7 +471,6 @@ reroute:
}
if (m == NULL)
goto senderr;
- in6_proto_cksum_out(m, rt->rt_ifp);
ip6 = mtod(m, struct ip6_hdr *);
if ((m->m_pkthdr.pf.flags & (PF_TAG_REROUTE | PF_TAG_GENERATED)) ==
(PF_TAG_REROUTE | PF_TAG_GENERATED)) {
@@ -484,6 +483,7 @@ reroute:
goto reroute;
}
#endif
+ in6_proto_cksum_out(m, rt->rt_ifp);
/* Check the size after pf_test to give pf a chance to refragment. */
if (m->m_pkthdr.len > IN6_LINKMTU(rt->rt_ifp)) {
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index d203b09b4ec..8ac4566b4b9 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.130 2012/11/02 13:14:05 henning Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.131 2012/11/05 21:49:15 claudio Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -534,7 +534,6 @@ reroute:
splx(s);
goto done;
}
- in6_proto_cksum_out(m, encif);
ip6 = mtod(m, struct ip6_hdr *);
/*
* PF_TAG_REROUTE handling or not...
@@ -544,6 +543,7 @@ reroute:
* What's the behaviour?
*/
#endif
+ in6_proto_cksum_out(m, encif);
m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */
@@ -806,7 +806,6 @@ reroute:
}
if (m == NULL)
goto done;
- in6_proto_cksum_out(m, ifp);
ip6 = mtod(m, struct ip6_hdr *);
if ((m->m_pkthdr.pf.flags & (PF_TAG_REROUTE | PF_TAG_GENERATED)) ==
(PF_TAG_REROUTE | PF_TAG_GENERATED)) {
@@ -820,6 +819,7 @@ reroute:
goto reroute;
}
#endif
+ in6_proto_cksum_out(m, ifp);
/*
* Send the packet to the outgoing interface.