mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
UDP checksum is mandatory in IPv6 (RFC2460 p.28)
Obtained from: KAME
This commit is contained in:
parent
396e20d19f
commit
b5676acff4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127711
@ -168,9 +168,11 @@ udp6_input(mp, offp, proto)
|
||||
/*
|
||||
* Checksum extended UDP header and data.
|
||||
*/
|
||||
if (uh->uh_sum == 0)
|
||||
if (uh->uh_sum == 0) {
|
||||
udpstat.udps_nosum++;
|
||||
else if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) {
|
||||
goto bad;
|
||||
}
|
||||
if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) {
|
||||
udpstat.udps_badsum++;
|
||||
goto bad;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user