Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

restore the data of the ip header when extended udp header and data c…

…hecksum

is calculated.  this caused some trouble in the code which the ip header
is not modified.  for example, inbound policy lookup failed.
  • Loading branch information...
commit a23f29cc9b6bfb7de25c4ec8ebaa2c328edd3dcf 1 parent f547a94
sakane authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  freebsd4/sys/netinet/udp_usrreq.c
View
3  freebsd4/sys/netinet/udp_usrreq.c
@@ -237,9 +237,12 @@ udp_input(m, off)
m->m_pkthdr.csum_data + IPPROTO_UDP));
uh->uh_sum ^= 0xffff;
} else {
+ char b[9];
+ bcopy(((struct ipovly *)ip)->ih_x1, b, 9);
bzero(((struct ipovly *)ip)->ih_x1, 9);
((struct ipovly *)ip)->ih_len = uh->uh_ulen;
uh->uh_sum = in_cksum(m, len + sizeof (struct ip));
+ bcopy(b, ((struct ipovly *)ip)->ih_x1, 9);
}
if (uh->uh_sum) {
udpstat.udps_badsum++;
Please sign in to comment.
Something went wrong with that request. Please try again.