svn commit: r272645 - in stable/10/sys: netinet netinet6
Michael Tuexen
tuexen at FreeBSD.org
Mon Oct 6 13:32:31 UTC 2014
Author: tuexen
Date: Mon Oct 6 13:32:30 2014
New Revision: 272645
URL: https://svnweb.freebsd.org/changeset/base/272645
Log:
MFC r272323:
If the checksum coverage field in the UDPLITE header is the length
of the complete UDPLITE packet, the packet has full checksum coverage.
So fix the condition.
Modified:
stable/10/sys/netinet/udp_usrreq.c
stable/10/sys/netinet6/udp6_usrreq.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/netinet/udp_usrreq.c
==============================================================================
--- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 13:31:44 2014 (r272644)
+++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 13:32:30 2014 (r272645)
@@ -434,9 +434,10 @@ udp_input(struct mbuf *m, int off)
*/
len = ntohs((u_short)uh->uh_ulen);
ip_len = ntohs(ip->ip_len) - iphlen;
- if (pr == IPPROTO_UDPLITE && len == 0) {
+ if (pr == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) {
/* Zero means checksum over the complete packet. */
- len = ip_len;
+ if (len == 0)
+ len = ip_len;
cscov_partial = 0;
}
if (ip_len != len) {
Modified: stable/10/sys/netinet6/udp6_usrreq.c
==============================================================================
--- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:31:44 2014 (r272644)
+++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:32:30 2014 (r272645)
@@ -225,9 +225,10 @@ udp6_input(struct mbuf **mp, int *offp,
nxt = ip6->ip6_nxt;
cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0;
- if (nxt == IPPROTO_UDPLITE && ulen == 0) {
+ if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) {
/* Zero means checksum over the complete packet. */
- ulen = plen;
+ if (ulen == 0)
+ ulen = plen;
cscov_partial = 0;
}
if (nxt == IPPROTO_UDP && plen != ulen) {
More information about the svn-src-stable-10
mailing list