diff options
author | tuexen <tuexen@FreeBSD.org> | 2014-10-06 13:32:30 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2014-10-06 13:32:30 +0000 |
commit | 952b4cb5f7934b4cb05aa080a728b75bf08c526d (patch) | |
tree | 7f5cae55d609056abf69337985818fb2a0707fdf /sys/netinet6/udp6_usrreq.c | |
parent | 70661238f1e61dcf7566dcb3272a496e1229f1a5 (diff) | |
download | FreeBSD-src-952b4cb5f7934b4cb05aa080a728b75bf08c526d.zip FreeBSD-src-952b4cb5f7934b4cb05aa080a728b75bf08c526d.tar.gz |
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.
Diffstat (limited to 'sys/netinet6/udp6_usrreq.c')
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 0d68590..0142804 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -225,9 +225,10 @@ udp6_input(struct mbuf **mp, int *offp, int proto) 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) { |