summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorgnn <gnn@FreeBSD.org>2008-08-29 20:42:58 +0000
committergnn <gnn@FreeBSD.org>2008-08-29 20:42:58 +0000
commit995cb3f198bb469899d5ef7e11e6cd165dbcc0cb (patch)
tree40db23e57efcab29fb2c87aacf825ae75e18fc36 /sys/netinet
parenta19823099f34807d93a12ef647b3c95cec43f793 (diff)
downloadFreeBSD-src-995cb3f198bb469899d5ef7e11e6cd165dbcc0cb.zip
FreeBSD-src-995cb3f198bb469899d5ef7e11e6cd165dbcc0cb.tar.gz
Fix a bug whereby multicast packets that are looped back locally
wind up with the incorrect checksum on the wire when transmitted via devices that do checksum offloading. PR: kern/119635 Reviewed by: rwatson MFC after: 5 days
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 88e18a1..4567f05 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1146,7 +1146,11 @@ ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst,
register struct ip *ip;
struct mbuf *copym;
- copym = m_copy(m, 0, M_COPYALL);
+ /*
+ * Make a deep copy of the packet because we're going to
+ * modify the pack in order to generate checksums.
+ */
+ copym = m_dup(m, M_DONTWAIT);
if (copym != NULL && (copym->m_flags & M_EXT || copym->m_len < hlen))
copym = m_pullup(copym, hlen);
if (copym != NULL) {
OpenPOWER on IntegriCloud