提交 24c4a81d 编写于 作者: A Alexander Aring 提交者: Marcel Holtmann

6lowpan: iphc: fix SAM/DAM bit comment

This patch fixes the comments for SAM/DAM value.
Signed-off-by: NAlexander Aring <aar@pengutronix.de>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 6aaf37b4
...@@ -788,7 +788,7 @@ static u8 lowpan_compress_ctx_addr(u8 **hc_ptr, const struct in6_addr *ipaddr, ...@@ -788,7 +788,7 @@ static u8 lowpan_compress_ctx_addr(u8 **hc_ptr, const struct in6_addr *ipaddr,
} }
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
/* check for SAM/DAM = 01 */ /* check for SAM/DAM = 10 */
tmp.s6_addr[11] = 0xFF; tmp.s6_addr[11] = 0xFF;
tmp.s6_addr[12] = 0xFE; tmp.s6_addr[12] = 0xFE;
memcpy(&tmp.s6_addr[14], &ipaddr->s6_addr[14], 2); memcpy(&tmp.s6_addr[14], &ipaddr->s6_addr[14], 2);
...@@ -801,7 +801,7 @@ static u8 lowpan_compress_ctx_addr(u8 **hc_ptr, const struct in6_addr *ipaddr, ...@@ -801,7 +801,7 @@ static u8 lowpan_compress_ctx_addr(u8 **hc_ptr, const struct in6_addr *ipaddr,
} }
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
/* check for SAM/DAM = 10, should always match */ /* check for SAM/DAM = 01, should always match */
memcpy(&tmp.s6_addr[8], &ipaddr->s6_addr[8], 8); memcpy(&tmp.s6_addr[8], &ipaddr->s6_addr[8], 8);
/* context information are always used */ /* context information are always used */
ipv6_addr_prefix_copy(&tmp, &ctx->pfx, ctx->plen); ipv6_addr_prefix_copy(&tmp, &ctx->pfx, ctx->plen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册