diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-07-18 14:25:48 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-07-18 14:25:48 +0000 |
commit | 446479e8a17f0be8bb2bc6c1d3feddc8175e3173 (patch) | |
tree | 10d3ac65395cc92ba6a799df2d18b4d0743dd488 /sys | |
parent | 8ec9b1951ba8104ace17462a1a2e3d8d94c92756 (diff) | |
download | FreeBSD-src-446479e8a17f0be8bb2bc6c1d3feddc8175e3173.zip FreeBSD-src-446479e8a17f0be8bb2bc6c1d3feddc8175e3173.tar.gz |
Fix a stupid attemp to apply host arithmetics to network byte ordered data.
This fixes checksum for some drivers with partial H/W ckcsum offloads.
Reported by: Simon 'corecode' Schubert, Devon H. O'Dell, hmp
Reviewed by: Pyun YongHyeon
Diffstat (limited to 'sys')
-rw-r--r-- | sys/contrib/pf/net/pf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c index e0063a1..f76f248 100644 --- a/sys/contrib/pf/net/pf.c +++ b/sys/contrib/pf/net/pf.c @@ -5605,7 +5605,7 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, sa_family_t a sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr, htonl(m->m_pkthdr.csum_data + - IPPROTO_TCP) + ip->ip_len); + IPPROTO_TCP + ntohs(ip->ip_len))); } sum ^= 0xffff; ++hw_assist; |