Check a correct bit for ip4csum-rx. Reported privately on PR kern/40955.
This commit is contained in:
parent
643809db9f
commit
030266c11f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl8169.c,v 1.111 2009/03/21 10:05:28 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl8169.c,v 1.112 2009/03/27 12:19:17 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998-2003
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.111 2009/03/21 10:05:28 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.112 2009/03/27 12:19:17 tsutsui Exp $");
|
||||
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
|
||||
|
||||
/*
|
||||
@ -1276,7 +1276,7 @@ re_rxeof(struct rtk_softc *sc)
|
||||
/* Check IP header checksum */
|
||||
if ((rxstat & RE_RDESC_STAT_PROTOID) != 0 &&
|
||||
((sc->sc_quirk & RTKQ_DESCV2) == 0 ||
|
||||
(rxvlan & RE_PROTOID_IP) != 0)) {
|
||||
(rxvlan & RE_RDESC_VLANCTL_IPV4) != 0)) {
|
||||
m->m_pkthdr.csum_flags |= M_CSUM_IPv4;
|
||||
if (rxstat & RE_RDESC_STAT_IPSUMBAD)
|
||||
m->m_pkthdr.csum_flags |= M_CSUM_IPv4_BAD;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl81x9reg.h,v 1.34 2009/03/21 07:58:30 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl81x9reg.h,v 1.35 2009/03/27 12:19:17 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998
|
||||
@ -524,6 +524,8 @@ struct re_desc {
|
||||
#define RE_RDESC_VLANCTL_TAG 0x00010000 /* VLAN tag available
|
||||
(re_vlandata valid)*/
|
||||
#define RE_RDESC_VLANCTL_DATA 0x0000FFFF /* TAG data */
|
||||
#define RE_RDESC_VLANCTL_IPV6 0x80000000 /* DESCV2 IPV6 packet */
|
||||
#define RE_RDESC_VLANCTL_IPV4 0x40000000 /* DESCV2 IPV4 packet */
|
||||
|
||||
#define RE_PROTOID_NONIP 0x00000000
|
||||
#define RE_PROTOID_TCPIP 0x00010000
|
||||
|
Loading…
Reference in New Issue
Block a user