| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Adds recgnition that the Mesh Private Beacon model is internal
and foundational, without bindings.
|
|
|
|
|
|
|
|
| |
Add Remote Provisioning Server
Add Remote Provisioning Client
Remove local scanning/provisioning
Add delete-all dev key function
Add NPPI procedures
|
|
|
|
|
| |
If a user tries to configure publication of a model with an appkey that
is not bound to that model, an error should be returned.
|
|
|
|
|
|
|
| |
This fixes a potential NULL pointer dereferencing in mesh_model_pub_set()
when virtual address publication cannot be successfully stored.
Also, fix a minor memory leak that may occur on unsuccessful model
initialization from storage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds SPDX License Identifier and removes the license text.
-------------------------------------
License COUNT
-------------------------------------
LGPL-2.1-or-later : 48
License: LGPL-2.1-or-later
mesh/mesh-mgmt.h
mesh/mesh-mgmt.c
mesh/net-keys.c
mesh/mesh-io-api.h
mesh/mesh.h
mesh/net-keys.h
mesh/model.h
mesh/util.h
mesh/appkey.c
mesh/cfgmod.h
mesh/appkey.h
mesh/prov.h
mesh/prov-acceptor.c
mesh/net.c
mesh/dbus.h
mesh/friend.h
mesh/mesh-io-generic.c
mesh/main.c
mesh/util.c
mesh/dbus.c
mesh/error.h
mesh/mesh-config-json.c
mesh/agent.h
mesh/pb-adv.c
mesh/crypto.c
mesh/crypto.h
mesh/friend.c
mesh/pb-adv.h
mesh/provision.h
mesh/mesh-config.h
mesh/mesh-io-generic.h
mesh/agent.c
mesh/cfgmod-server.c
mesh/mesh-io.h
mesh/keyring.h
mesh/net.h
mesh/keyring.c
mesh/mesh-defs.h
mesh/mesh.c
mesh/rpl.c
mesh/manager.c
mesh/model.c
mesh/mesh-io.c
mesh/node.c
mesh/prov-initiator.c
mesh/rpl.h
mesh/node.h
mesh/manager.h
|
|
|
|
|
| |
In model.c, tx_Start is a static variable, dynamically set, but
never used. Is removed now.
|
|
|
|
|
|
|
|
|
| |
Check whether an incoming message has an RPL entry prior to
handing it over to model layer for processing. If present in RPL
or the RPL queue is full, ignore the incoming message.
If the incoming message is processed successfully, add the message
as a new RPL entry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds processing of "options" dictionary argument in Send,
DevKeySend & Publish methods on mesh.Node interface.
This new argument is a dictionary that currently has only one
new key word defined for Send() and DevKeySend():
"ForceSegmented" - to force small payloads to be sent as
one-segment messages
In case of Publish(), and additional keyword is defined
"Vendor" - 16-bit Company ID as defined by the Bluetooth SIG
Other key words may be defined in future to accommodate evolving
requirements of Mesh Profile specification.
Also, the addition of "options" dictionary to Publish allows to
eliminate VendorPublish() method (taken care by "Vendor" keyword).
|
|
|
|
|
|
|
| |
Retrieve value of bound Net Key index based on the value of
passed AppKey index. Check if the key is present and fail early
in case of error. Also, pass the correct NetKey index to model
layer in mesh_model_send(), instead of hard coded 0.
|
|
|
|
|
|
| |
This adds previously missing retransmit count and interval values
specific to model publications. The values are configured by Config CLient
and may be different to each model.
|
|
|
|
|
|
| |
The value of net_index in DevKeyMessageReceived() method must be set
to the value of a subnet index on which a device key encoded message
has been received. Was hard coded to 0. Fixed.
|
|
|
|
|
|
| |
This moves the check for incoming messages addressed to fixed addresses,
e.g. RELAY, PROXY, FRIEND. If the corresponding feature is not enabled,
the message is not processed.
|
|
|
|
|
|
| |
This changes the order of function arguments in
mesh_config_model_binding_add() and mesh_config_model_binding_del()
to make them consistent with the rest of mesh_config_model... APIs
|
|
|
|
|
|
|
|
| |
Model IDs for SIG defined models need to be stripped off SIG_VENDOR
value used for internal housekeeping prior to calling functions
that save new model state in node configuration.
Also, remove duplicate statements for model lookup in node config.
|
|
|
|
|
| |
Use element address for looking up element index (subscription
address was erroneously used to perform the lookup).
|
|
|
|
|
|
|
|
| |
Because l_queue_find can't distinguish between entry->data equal to zero
and missing entry, has_binding() fails when we bind app key with index
0, via L_UINT_TO_PTR.
Bug has been introduced in commit 1a2a6debd
|
|
|
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
Also, return Feature Not Supported errror code when credential
flag is set, but the node does not support LPN feature
|
|
|
|
|
|
|
| |
This modification allows using a single point for sending out
the composed status messages by the Config Server.
Also, remove unused definitions for binding functions in node.h
|
|
|
|
|
|
|
|
| |
This provides better functional grouping based on whether a group or
a virtual label is used for the subscription address.
Also, use a single point for sending out the composed Config Server
status messages.
|
|
|
|
|
|
| |
When sending model publishing data, use TTL value configured for
that publication instead of the default TTL value used for regular
messages.
|
|
|
|
|
|
|
|
| |
This fixes the extraction of bit fields from model publication
period octet received as part of Congif Publication Set message.
The step resolution field is extracted as upper 2 bits (shift by 6)
and the number of steps field is extracted by masking lower 6 bits.
|
|
|
|
|
|
|
|
|
| |
This moves the model related code out of node.c to model.c providing
for better functional separation of modules.
Also, use the value of 0xFFFF for internal representation of vendor ID
for BT SIG defined models. This allows to maintain a single internal
vendor ID / model ID space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds handling of new options dictionary included with
"Models" and "VendorModels" properties on org.bluez.mesh.Element1
interface.
Supported (optional) dictionary entries:
"Publish" - indicates whether the model supports publication mechanism.
If not present, publication is enabled.
"Subscribe" - indicates whether the model supports subscription mechanism.
If not present, subscriptions are enabled.
If a config message related to subscription state is received for a model
that does not support subscription mechanism, an error code 0x08,
("Not A Subscribe Model") is sent in response.
If a config message related to publication state is received for a model
that does not support publication mechanism, an error code 0x07
("Invalid Publish Parameters") is sent in response.
|
|
|
|
|
|
|
|
|
| |
Before the clean-up we were making a useless check of an otherwise
unused boolean (net->provisioner) to determine if we should decode with
device keys (which was incorrect). This was replaced by a check the
node type (node->provisioner). However, the check was incorrect in the
first place, and prevents provisioner nodes from decrypting non device
key messages.
|
|
|
|
|
| |
This removes mesh_net_provisioner_mode_set (unused) and
mesh_net_provisioner_mode_get (duplicates node_is_provisioner)
|
|
|
|
|
|
| |
This removes callback for sending every single access layer packet
since the callback does nothing but print debug satement. This
functionality is mature enough not to require such heavy debugging.
|
|
|
|
|
| |
This changes l_info() to l_debug() for recurring cases and
removes some excessive debug output.
|
|
|
|
|
|
|
|
|
|
|
| |
For added reliability, it is legal to send short messages as "single
segment" segmented messages, which require transport layer
acknowledgement. This feature is intended for heavy usage in the future
so I am adding it now.
Further, to support this functionality, an additional queue has been
added to allow multiple SAR messages to the same DST to be queued and
sent serially.
|
|
|
|
|
|
|
|
|
| |
This removes unused ttl parameter from mesh_model_rx(). The TTL value
is not processed at the access layer, so there is no need to pass it
to a model.
Also, remove "uint32_t dst" parameter from the typedef of
mesh_model_recv_cb: providing a just destination address is sufficient
for internally implemented models (currently, it's only Config Server)
|
|
|
|
|
| |
This reorganizes the part of the code that handles model publishing
and subscribitng to virtual labels.
|
|
|
|
|
|
|
| |
This fixes a bug when a virtual label and its size hasn't been passed
to a decryption function: instead of always using NULL pointer for
label and 0 for lable size, use actual virtual label info if decrypting
a payload addressed to a virtual destination.
|
|
|
|
|
|
|
| |
Re-arranged for efficiency. Replay Protection was set up as an atomic
check-and-add operation. Now we check the message early so we can
discard it without taking further action, and only add it to the RPL
once fully verified that it was authorized and addressed to us.
|
|
|
|
|
|
| |
Replay Protection was only being applied against Application Keys,
but messages with Device Keys are just as vulnerable, and need to be
checked as well.
|
|
|
|
|
|
|
| |
The specification calls for a flatter Replay Protection List that
applies to all processed messages, regardless of which credentials
were used to secure them. So storage and checking is now centralized
in mesh/net.c
|
|
|
|
|
|
|
|
|
|
| |
After introducing "remote" flag for DevKeyMessageReceived in
c8cd5b04ccd865deeb90b70ea649c0b6cc0385e6, we can now allow applications
to received DevKey messages from external addresses as well as from
local ones.
This enables applications to properly implement models using DevKey
security, by accepting only requests with "remote" flag set to false.
|
|
|
|
|
|
| |
This change makes the node initialization a bit easier to follow.
Replace if-else with switch when processing request type, descriptive
function names, more predictable code flow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Foundation Model Layer uses little endian ordering. As a
consequence the (re)transmit count and interval steps in the Config
Relay, Config Model Publication and Config Network Transmit messages
use the lower 3 bits for the (re)transmission count and the higher 5
bits for the interval steps.
The figure 4.5 in section 4.3.2.16 of the Mesh Profile Bluetooth
Specification provides a good clarification.
This patch therefore fixes those messages for both the daemon and
configuration client parts.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Move appkey_packet_decrypt to mesh/model, rename it to
app_packet_decrypt, make it private and change arguments to be aligned
with other decryption functions.
Also, simplify the implementation using an inline loop, removing the
need of mod_decrypt struct.
|
|
|
|
|
|
| |
After 8f0839a1c46300ceb1b129d17a3bff446ff79d08, mesh/crypto uses _aid
suffix for keys' AID property, so let's change the wording in mesh/model
as well.
|
|
|
|
|
|
|
|
|
| |
When sending or receiving Device Key (privileged) mesh messages, the
remote vs local device key must be specified. This allows Apps to
specify Key Ring stored device keys, and sanity checks that the correct
key exists before allowing the transmission. Loopback messages to local
servers *must* use keys from the Key Ring to indicate privilege has been
granted.
|
|
|
|
|
|
|
| |
This changes the prototypes for mesh_config_model_binding_add() and
mesh_config_model_binding_del() to take the element's address as input
parameter instead of the element's index. The change aligns the API
with other functions that handle storage of model states.
|
|
|
|
|
|
|
|
| |
This handles the case when an inbound message is addressed to
a fixed group, i.e., all-proxies, all-friends, all-relays and
all-nodes. The message is delivered to a primary element only,
and, with the exception of all-nodes case, if the corresponding
feature is enabled on the node.
|
|
|
|
|
| |
+changed "not authorized" error to "invalid args" when managing device
key for local address range
|
|
|
|
|
|
|
|
|
| |
When a model receives a message, it is required by the spec
to respond using the same credentials. When an App Key is used,
this is trivial because App keys are bound to Net keys, so only
the App Index is required. Messages received on a Device key
however, need the Net Index preserved from original message for
re-use during the response.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This completely removes storage.c file. Instead, the handling
of mesh node configuration storage is done completely in
mesh-config layer by calling the following API functions:
bool mesh_config_load_nodes(const char *cfg_dir,
mesh_config_node_func_t cb,
void *user_data)
void mesh_config_release(struct mesh_config *cfg)
void mesh_config_destroy(struct mesh_config *cfg)
bool mesh_config_save(struct mesh_config *cfg, bool no_wait,
mesh_config_status_func_t cb, void *user_data)
struct mesh_config *mesh_config_create(const char *cfg_path,
const uint8_t uuid[16],
struct mesh_config_node *node)
|
|
|
|
|
|
|
|
| |
This eliminates storage_set...() routines as an intermediate
layer between mesh_config layer and the rest of the daemon when
storing updated node configuration values.
For the JSON based implementation, each call to mesh_config_write...()
routines results in writing to the node configuration file.
|
|
|
|
|
|
|
|
| |
This removes dependency on json-s/json.h header from everywhere
in the code except for mesh-config-json.c. The details about
node configuration storage format are obfuscated: a pointer
to an opaque mesh_config structure is stored with mesh_node and is
passed around to mae all the storage related operations.
|