diff --git a/CHANGELOG b/CHANGELOG index 1f340d24..d2682f86 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index d934950f..7478d67d 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -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 */