fixed bug #41094 (Byte-order bug in IPv6 fragmentation header test)

This commit is contained in:
sg 2015-03-04 21:02:52 +01:00
parent 12514c09b2
commit 61e0efa0c7
2 changed files with 6 additions and 5 deletions

View File

@ -205,6 +205,9 @@ HISTORY
++ Bugfixes:
2015-03-04: Valery Ushakov
* ip6.c: fixed bug #41094 (Byte-order bug in IPv6 fragmentation header test)
2015-03-04: Zach Smith
* nd6.c: fixed bug #38153 (nd6_input() byte order issues)

View File

@ -607,14 +607,12 @@ netif_found:
}
/* Offset == 0 and more_fragments == 0? */
if (((frag_hdr->_fragment_offset & IP6_FRAG_OFFSET_MASK) == 0) &&
((frag_hdr->_fragment_offset & IP6_FRAG_MORE_FLAG) == 0)) {
if ((frag_hdr->_fragment_offset &
PP_HTONS(IP6_FRAG_OFFSET_MASK | IP6_FRAG_MORE_FLAG)) == 0) {
/* This is a 1-fragment packet, usually a packet that we have
* already reassembled. Skip this header anc continue. */
pbuf_header(p, -hlen);
}
else {
} else {
#if LWIP_IPV6_REASS
/* reassemble the packet */