One more round on the H/W supported checksum code: Fix NICs that can't do
the pseudo header. We really need the TCP packet length here. This happens to end up in ip->ip_len in tcp_input.c, but here we should get it from the len function variable instead. Submitted by: yongari Tested by: Nicolas Linard, yongari (sparc64 + hme) MFC after: 5 days
This commit is contained in:
parent
1e7fad6b6a
commit
c9f6794e2e
@ -5619,9 +5619,8 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, sa_family_t a
|
||||
} else {
|
||||
ip = mtod(m, struct ip *);
|
||||
sum = in_pseudo(ip->ip_src.s_addr,
|
||||
ip->ip_dst.s_addr,
|
||||
htonl(m->m_pkthdr.csum_data +
|
||||
IPPROTO_TCP + ntohs(ip->ip_len)));
|
||||
ip->ip_dst.s_addr, htonl((u_short)len +
|
||||
m->m_pkthdr.csum_data + IPPROTO_TCP));
|
||||
}
|
||||
sum ^= 0xffff;
|
||||
++hw_assist;
|
||||
|
Loading…
x
Reference in New Issue
Block a user