summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-11-01 16:56:33 +0000
committerru <ru@FreeBSD.org>2000-11-01 16:56:33 +0000
commit549eb5cb6bb89790b0587cd0e692e7f610a33e25 (patch)
tree83a8210b961625202af5e6f2fa6982158c7d119f /sys/netinet/udp_usrreq.c
parent105fcddd7fb1c85d99e21e0770a00f17660547fc (diff)
downloadFreeBSD-src-549eb5cb6bb89790b0587cd0e692e7f610a33e25.zip
FreeBSD-src-549eb5cb6bb89790b0587cd0e692e7f610a33e25.tar.gz
Wrong checksum may have been computed for certain UDP packets.
Reviewed by: jlemon
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 589fbef..221dd8d 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -220,7 +220,7 @@ udp_input(m, off, proto)
uh->uh_sum = m->m_pkthdr.csum_data;
else
uh->uh_sum = in_pseudo(ip->ip_src.s_addr,
- ip->ip_dst.s_addr, htonl(ip->ip_len +
+ ip->ip_dst.s_addr, htonl((u_short)len +
m->m_pkthdr.csum_data + IPPROTO_UDP));
uh->uh_sum ^= 0xffff;
} else {
OpenPOWER on IntegriCloud