Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 80a2ffe

Browse files
author
Jay Logue
authored
Merge pull request #558 from openweave/bug/emargolis/fix-get-weave-node-id-from-addr-function
Fixed GetWeaveNodeIdFromAddr() Function Implementation.
2 parents 922fee1 + 986b83c commit 80a2ffe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/support/logging/DecodedIPPacket.cpp

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
*
3+
* Copyright (c) 2020 Google LLC.
34
* Copyright (c) 2014-2017 Nest Labs, Inc.
45
* All rights reserved.
56
*
@@ -182,7 +183,7 @@ uint64_t DecodedIPPacket::GetWeaveNodeIdFromAddr(const uint8_t *addr)
182183
{
183184
nodeId = ((static_cast<uint64_t>(addr[8] << 24 | addr[9] << 16 | addr[10] << 8 | addr[11]) << 32) |
184185
static_cast<uint64_t>(addr[12] << 24 | addr[13] << 16 | addr[14] << 8 | addr[15]))
185-
& ~(0x0200000000000000ULL);
186+
^ kEUI64_UL_Mask;
186187
}
187188

188189
return nodeId;

0 commit comments

Comments
 (0)