diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-23 06:24:24 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-23 06:24:24 +0000 |
commit | 123a795ecb378c68b28721b1a8c9dc3b11990ba0 (patch) | |
tree | d3ace7c9ec8182bed9b9a026ac4be4ed761e772b /sys/net | |
parent | 81cf73c9c03eaff56e2619b044426a3d702c7240 (diff) |
Remember to compute IP/TCP/UDP checksum if we're going to broadcast on
bridge.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_bridge.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 46dec024a4c..fb913f62631 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.61 2001/06/22 14:28:58 deraadt Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.62 2001/06/23 06:24:23 angelos Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -793,6 +793,22 @@ bridge_output(ifp, m, sa, rt) } #endif /* IPSEC */ + /* Catch packets that needs TCP/UDP/IP hardware checksumming */ + if (m->m_pkthdr.csum & M_IPV4_CSUM_OUT) { + /* XXX Compute IP checksum */ + m->m_pkthdr.csum &= ~M_IPV4_CSUM_OUT; /* Clear */ + } + + if (m->m_pkthdr.csum & M_TCPV4_CSUM_OUT) { + /* XXX Compute TCP checksum */ + m->m_pkthdr.csum &= ~M_TCPV4_CSUM_OUT; /* Clear */ + } + + if (m->m_pkthdr.csum & M_UDPV4_CSUM_OUT) { + /* XXX Compute UDP checksum */ + m->m_pkthdr.csum &= ~M_UDPV4_CSUM_OUT; /* Clear */ + } + LIST_FOREACH(p, &sc->sc_iflist, next) { dst_if = p->ifp; if ((dst_if->if_flags & IFF_RUNNING) == 0) |