Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dist/pf/net pfil6_wrapper: handle M_CSUM_TCPv6|M_CSUM_UD...



details:   https://anonhg.NetBSD.org/src/rev/beea88a61a0b
branches:  trunk
changeset: 583550:beea88a61a0b
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Aug 11 13:01:24 2005 +0000

description:
pfil6_wrapper: handle M_CSUM_TCPv6|M_CSUM_UDPv6.

diffstat:

 sys/dist/pf/net/pf_ioctl.c |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r e017f7e9cecb -r beea88a61a0b sys/dist/pf/net/pf_ioctl.c
--- a/sys/dist/pf/net/pf_ioctl.c        Thu Aug 11 11:20:48 2005 +0000
+++ b/sys/dist/pf/net/pf_ioctl.c        Thu Aug 11 13:01:24 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf_ioctl.c,v 1.19 2005/08/06 11:22:39 yamt Exp $       */
+/*     $NetBSD: pf_ioctl.c,v 1.20 2005/08/11 13:01:24 yamt Exp $       */
 /*     $OpenBSD: pf_ioctl.c,v 1.139 2005/03/03 07:13:39 dhartmei Exp $ */
 
 /*
@@ -3022,6 +3022,19 @@
                return error;
        }
 
+       /*
+        * 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);
+               }
+       }
+
        if (pf_test6(dir == PFIL_OUT ? PF_OUT : PF_IN, ifp, mp, NULL)
            != PF_PASS) {
                m_freem(*mp);



Home | Main Index | Thread Index | Old Index