aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Aring <aar@pengutronix.de>2016-03-07 14:07:31 -0500
committerMarcel Holtmann <marcel@holtmann.org>2016-03-10 13:51:29 -0500
commit24c4a81d765738655f94d242eb821cb26e6c143a (patch)
tree6257f74af53bc2141b48fa25b87d8090fc82f125
parent6aaf37b41a37b184e509aa3ec29d96b7712dfd43 (diff)
6lowpan: iphc: fix SAM/DAM bit comment
This patch fixes the comments for SAM/DAM value. Signed-off-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/6lowpan/iphc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/6lowpan/iphc.c b/net/6lowpan/iphc.c
index 72172514fea0..99bb22aea346 100644
--- a/net/6lowpan/iphc.c
+++ b/net/6lowpan/iphc.c
@@ -788,7 +788,7 @@ static u8 lowpan_compress_ctx_addr(u8 **hc_ptr, const struct in6_addr *ipaddr,
788 } 788 }
789 789
790 memset(&tmp, 0, sizeof(tmp)); 790 memset(&tmp, 0, sizeof(tmp));
791 /* check for SAM/DAM = 01 */ 791 /* check for SAM/DAM = 10 */
792 tmp.s6_addr[11] = 0xFF; 792 tmp.s6_addr[11] = 0xFF;
793 tmp.s6_addr[12] = 0xFE; 793 tmp.s6_addr[12] = 0xFE;
794 memcpy(&tmp.s6_addr[14], &ipaddr->s6_addr[14], 2); 794 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 } 801 }
802 802
803 memset(&tmp, 0, sizeof(tmp)); 803 memset(&tmp, 0, sizeof(tmp));
804 /* check for SAM/DAM = 10, should always match */ 804 /* check for SAM/DAM = 01, should always match */
805 memcpy(&tmp.s6_addr[8], &ipaddr->s6_addr[8], 8); 805 memcpy(&tmp.s6_addr[8], &ipaddr->s6_addr[8], 8);
806 /* context information are always used */ 806 /* context information are always used */
807 ipv6_addr_prefix_copy(&tmp, &ctx->pfx, ctx->plen); 807 ipv6_addr_prefix_copy(&tmp, &ctx->pfx, ctx->plen);