Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dist/ipf/netinet fr_check_wrapper6: handle M_CSUM_TCPv6|...
details: https://anonhg.NetBSD.org/src/rev/7ead7af07f03
branches: trunk
changeset: 583551:7ead7af07f03
user: yamt <yamt%NetBSD.org@localhost>
date: Thu Aug 11 13:01:38 2005 +0000
description:
fr_check_wrapper6: handle M_CSUM_TCPv6|M_CSUM_UDPv6.
diffstat:
sys/dist/ipf/netinet/ip_fil_netbsd.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r beea88a61a0b -r 7ead7af07f03 sys/dist/ipf/netinet/ip_fil_netbsd.c
--- a/sys/dist/ipf/netinet/ip_fil_netbsd.c Thu Aug 11 13:01:24 2005 +0000
+++ b/sys/dist/ipf/netinet/ip_fil_netbsd.c Thu Aug 11 13:01:38 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil_netbsd.c,v 1.14 2005/05/29 21:57:49 christos Exp $ */
+/* $NetBSD: ip_fil_netbsd.c,v 1.15 2005/08/11 13:01:38 yamt Exp $ */
/*
* Copyright (C) 1993-2003 by Darren Reed.
@@ -206,6 +206,22 @@
struct ifnet *ifp;
int dir;
{
+#if defined(INET6)
+#if defined(M_CSUM_TCPv6)
+ /*
+ * If the packet is out-bound, we can't delay checksums
+ * here. For in-bound, the checksum has already been
+ * validated.
+ */
+ if (dir == PFIL_OUT) {
+ if ((*mp)->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) {
+ in6_delayed_cksum(*mp);
+ (*mp)->m_pkthdr.csum_flags &=
+ ~(M_CSUM_TCPv6|M_CSUM_UDPv6);
+ }
+ }
+#endif /* M_CSUM_TCPv6 */
+#endif /* INET6 */
return (fr_check(mtod(*mp, struct ip *), sizeof(struct ip6_hdr),
ifp, (dir == PFIL_OUT), mp));
Home |
Main Index |
Thread Index |
Old Index