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/netinet | |
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/netinet')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index a3a365a..a02846d 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -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) { |