diff options
author | Brian Gix <brian.gix@intel.com> | 2019-04-04 15:43:14 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-04-09 09:58:22 -0700 |
commit | c051df3cf9652f971a9ea1e2beb5b66d69ed01ce (patch) | |
tree | 25a0d2e2c3e5ba5f3e612a60a7d378bad760d797 /mesh/mesh.c | |
parent | 9f7659a44601e043bdb6724b0ab4f3f59c46e9fe (diff) | |
download | bluez-c051df3cf9652f971a9ea1e2beb5b66d69ed01ce.tar.gz |
mesh: Create and store random token per node
Fix issue with device key being used as a token. Token now seperate, and
with a portable representation in the node database.
Diffstat (limited to 'mesh/mesh.c')
-rw-r--r-- | mesh/mesh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesh/mesh.c b/mesh/mesh.c index a0a9a7c8e..e7eef0473 100644 --- a/mesh/mesh.c +++ b/mesh/mesh.c @@ -487,7 +487,7 @@ static bool prov_complete_cb(void *user_data, uint8_t status, struct l_dbus_message *msg; const char *owner; const char *path; - const uint8_t *dev_key; + const uint8_t *token; l_debug("Provisioning complete %s", prov_status_str(status)); @@ -506,13 +506,13 @@ static bool prov_complete_cb(void *user_data, uint8_t status, return false; } - dev_key = node_get_device_key(join_pending->node); + token = node_get_token(join_pending->node); msg = l_dbus_message_new_method_call(dbus, owner, path, MESH_APPLICATION_INTERFACE, "JoinComplete"); - l_dbus_message_set_arguments(msg, "t", l_get_u64(dev_key)); + l_dbus_message_set_arguments(msg, "t", l_get_be64(token)); l_dbus_send(dbus_get_bus(), msg); |