Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci missing M_CSUM_IPv4 checking. It does not cause ...



details:   https://anonhg.NetBSD.org/src/rev/ebad60d21d21
branches:  trunk
changeset: 822481:ebad60d21d21
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Mar 22 02:56:12 2017 +0000

description:
missing M_CSUM_IPv4 checking. It does not cause problems, but it is wrong.

The implementations of M_CSUM_DATA_IPv4_IPHL() and M_CSUM_DATA_IPv6_HL()
is the same, so that does not cause problems.

diffstat:

 sys/dev/pci/if_wm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6d4940941856 -r ebad60d21d21 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Wed Mar 22 01:50:22 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Wed Mar 22 02:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.498 2017/03/21 10:39:52 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.499 2017/03/22 02:56:12 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.498 2017/03/21 10:39:52 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.499 2017/03/22 02:56:12 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -6442,7 +6442,7 @@
        }
 
        if ((m0->m_pkthdr.csum_flags &
-           (M_CSUM_TSOv4 | M_CSUM_UDPv4 | M_CSUM_TCPv4)) != 0) {
+           (M_CSUM_TSOv4 | M_CSUM_UDPv4 | M_CSUM_TCPv4 | M_CSUM_IPv4)) != 0) {
                iphl = M_CSUM_DATA_IPv4_IPHL(m0->m_pkthdr.csum_data);
        } else {
                iphl = M_CSUM_DATA_IPv6_HL(m0->m_pkthdr.csum_data);



Home | Main Index | Thread Index | Old Index