summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-23 07:14:33 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-06-23 07:14:33 +0000
commit1dfcb5d4a8e28697e2f3760a99b03875830c918c (patch)
tree0aad55d0b593f83168a01666bc3a1a12d0637ea9 /sys/netinet
parent4f628d9625946295dcd5a970fb77c627c3da8cda (diff)
Likewise, only use outgoing TCP/UDP hardware checksumming if the
interface is not in bridge mode.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_output.c5
-rw-r--r--sys/netinet/udp_usrreq.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 5a0a32c4f23..866828bdc88 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.40 2001/06/23 06:03:12 angelos Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.41 2001/06/23 07:14:32 angelos Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -958,7 +958,8 @@ send:
ro = &tp->t_inpcb->inp_route;
if (ro->ro_rt && (ro->ro_rt->rt_flags & RTF_UP)) {
ifp = ro->ro_rt->rt_ifp;
- if (ifp->if_capabilities & IFCAP_CSUM_TCPv4) {
+ if ((ifp->if_capabilities & IFCAP_CSUM_TCPv4) &&
+ ifp->if_bridge == NULL) {
m->m_pkthdr.csum |= M_TCPV4_CSUM_OUT;
tcpstat.tcps_outhwcsum++;
th->th_sum = in_cksum(m, (int)hdrlen);
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 763494b2086..4f60d3f7ec4 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.67 2001/06/23 06:03:13 angelos Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.68 2001/06/23 07:14:32 angelos Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -949,7 +949,8 @@ udp_output(m, va_alist)
ro = &inp->inp_route;
if (ro->ro_rt && (ro->ro_rt->rt_flags & RTF_UP)) {
ifp = ro->ro_rt->rt_ifp;
- if (ifp->if_capabilities & IFCAP_CSUM_UDPv4) {
+ if ((ifp->if_capabilities & IFCAP_CSUM_UDPv4) &&
+ ifp->if_bridge == NULL) {
m->m_pkthdr.csum |= M_UDPV4_CSUM_OUT;
udpstat.udps_outhwcsum++;
ui->ui_sum = in_cksum(m,