summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-04-07 05:03:26 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-04-07 05:03:26 +0000
commit458cf94f8cc014a36b9069a43fc6f0dd725588aa (patch)
tree64cfccb019c1f3a7592e802f172c6b941f302587 /sys/dev/pci
parent47bee9fd554074164674a3601d0ec03b4ae395d2 (diff)
dont enable checksumming. it appears to be broken on fragmented packets.
discovered by deraadt@, fix tested by deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_tht.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 1a5b168b9f7..7439b1dfbdc 100644
--- a/sys/dev/pci/if_tht.c
+++ b/sys/dev/pci/if_tht.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tht.c,v 1.121 2008/11/28 02:44:18 brad Exp $ */
+/* $OpenBSD: if_tht.c,v 1.122 2009/04/07 05:03:25 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -782,8 +782,7 @@ tht_attach(struct device *parent, struct device *self, void *aux)
ifp = &sc->sc_ac.ac_if;
ifp->if_softc = sc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
- ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 |
- IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
+ ifp->if_capabilities = IFCAP_VLAN_MTU;
ifp->if_ioctl = tht_ioctl;
ifp->if_start = tht_start;
ifp->if_watchdog = tht_watchdog;
@@ -1140,8 +1139,7 @@ tht_start(struct ifnet *ifp)
bc = sizeof(txt) +
sizeof(struct tht_pbd) * pkt->tp_dmap->dm_nsegs;
- flags = THT_TXT_TYPE | THT_TXT_FLAGS_UDPCS |
- THT_TXT_FLAGS_TCPCS | THT_TXT_FLAGS_IPCS | LWORDS(bc);
+ flags = THT_TXT_TYPE | LWORDS(bc);
txt.flags = htole32(flags);
txt.len = htole16(pkt->tp_m->m_pkthdr.len);
txt.uid = pkt->tp_id;
@@ -1358,13 +1356,6 @@ tht_rxd(struct tht_softc *sc)
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = letoh16(rxd.len);
- if (!ISSET(flags, THT_RXD_FLAGS_IPCS))
- m->m_pkthdr.csum_flags |= M_IPV4_CSUM_IN_OK;
- if (!ISSET(flags, THT_RXD_FLAGS_TCPCS))
- m->m_pkthdr.csum_flags |= M_TCP_CSUM_IN_OK;
- if (!ISSET(flags, THT_RXD_FLAGS_UDPCS))
- m->m_pkthdr.csum_flags |= M_UDP_CSUM_IN_OK;
-
/* XXX process type 3 rx descriptors */
#if NBPFILTER > 0