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/befa1bc7ec52
branches:  trunk
changeset: 352230:befa1bc7ec52
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 80df1767c21a -r befa1bc7ec52 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