| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This aligns the behavior of command line option --io to
add new "auto" value and modify the behavior of "generic"
value:
*auto* - Use first available controller: via MGMT interface
if kernel supports it, otherwise, via raw HCI socket (i.e.,
default to *generic*).
*generic:[hci]<index>* - Use generic HCI io on interface hci<index>
The default value is now *auto*, whereas *generic* is used
only if the specific HCI controller is explicitly specified.
|
|
|
|
|
|
|
| |
This fixes the out-of-bounds array access in mesh-io-mgmt.c caught
by address sanitizer. Similar fixes were applied earlier to
generic and unit IOs. With this patch, the common code is factored
into a centralized location.
|
|
|
|
|
| |
This frees resources associated with duplicate filter timer
when destroying management IO.
|
|
|
|
|
|
| |
If remote device does not respond to a Prov Link Open request, then the
callbacks do not get established, and attempting to send Failure
messages on the non-existent link rersult in seg fault.
|
|
|
|
| |
Remove excessive logging traffic
|
|
|
|
|
|
|
| |
The mesh daemon can process incoming mesh packets on more than one
controller, but if a Provisioning data packet that originated from the
local daemon is received by a different controller, it must be filtered
and disregarded, or it will break the provisioning protocol.
|
|
|
|
|
|
|
|
|
|
| |
Because the daemon explicitly supports multiple nodes, we need
local Config Clients to be able to see local unprovisioned devices.
This loops the unprovisioned beacon, so that local Provisioning servers
can see it.
Fixes Issue: https://github.com/bluez/bluez/issues/341
|
|
|
|
|
| |
When attempting to cancel an unknown Scan request structure must be
NULL initialized.
|
|
|
|
|
|
|
|
|
| |
This fixes adding mandatory models (config server, remote provisioner)
to a node whose configuration is being loaded from storage:
mesh_model_add() was called with a wrong argument.
Was: mesh_model_add(..., PRIMARY_ELE_IDX, ...);
Correct: mesh_model_add(..., ele->models, ...);
|
| |
|
| |
|
|
|
|
|
|
| |
When transitioning from Phase 1 to Phase 2 of a network key and we are
beaconing, we need to halt the beaconing on the old key version, and
begin beaconing on the new key version.
|
|
|
|
|
| |
Adds recgnition that the Mesh Private Beacon model is internal
and foundational, without bindings.
|
|
|
|
|
|
|
| |
With this change, we start evaluating received Mesh Private Beacons in
addition to the legacy Secure Network Beacons. We also add the ability
to request Tx of Mesh Private Beacons, which are regenerated with new
Random Nonce a minimum of every 0 - 2550 seconds.
|
|
|
|
|
|
| |
This initial server supports only the Mesh Private Beacon and returns
"Not Suppoerted" for Get/Set of Private GATT Proxy and Private Node
Identity beacons.
|
|
|
|
|
| |
If current storage does not exist in node.json, the Mesh Private
Beacon will be disabled.
|
|
|
|
|
| |
The derived key generated by the "nkpk" salt and network master key is
used to create Private Beacons as of Mesh Profile Specification v1.1
|
|
|
|
|
|
|
|
| |
Add Remote Provisioning Server
Add Remote Provisioning Client
Remove local scanning/provisioning
Add delete-all dev key function
Add NPPI procedures
|
|
|
|
|
|
|
| |
When a SAR transmission has been completed or cancelled, the recipent
should store the block authentication values for at least 10 seconds
and ignore new segments with the same values during this period. See
MshPRFv1.0.1 section 3.5.3.4.
|
|
|
|
|
| |
The message cache should be a strict ring buffer, suppressed message
should not move to the front of the queue.
|
|
|
|
|
| |
Verify that all parameters in a Provisioning Start PDU are valid, also
compared to the capabilities that has been sent.
|
|
|
|
|
|
| |
When a provisioning fails, all additionally received PDU should be
unexpected until link is closed by provisioner. See MshPRFv1.0.1 section
5.4.4.
|
|
|
|
|
| |
If an unknown PDU is received during provisioning, the provisioning
should fail with "Invalid PDU".
|
|
|
|
|
| |
The Key Refresh flag in the Secure Network beacon is now correctly
updated based on provisioning data after being successfully provisioned.
|
|
|
|
|
|
|
| |
If we receive a message from one of our Low Power nodes, which is
encrypted using frendship credentials and where the destination is not
us, we must relay that message using master credentials.
See MshPRFv1.0.1 section 3.6.6.2.
|
|
|
|
|
| |
A friend update should be queued when we receive a Secure Network beacon
that changes the IV Update state.
|
|
|
|
|
| |
The padding bits in a Friend Poll message must be zero.
See MshPRFv1.0.1 section 3.6.5.1.
|
|
|
|
|
| |
The cache size communicated to the Low Power node should be the same as
the cache size actually used.
|
|
|
|
|
|
|
| |
This fixes mesh io flow for MESH_IO_TYPE_UNIT_TEST which
got broken after:
commit 9966cb8b6999a5f54fc13acbd7e1526512a84342
("mesh: Add new kernel MGMT based IO transport")
|
|
|
|
|
| |
Transition to Phase 3 from Phase 0 does not cause any state change, but
is a valid transition. See MshPRFv1.0.1 section 4.2.14.
|
|
|
|
|
|
| |
If we are in Key Refresh Phase 1, and receive a Secure Network beacon
using the new NetKey and with KR flag set to 0, Phase 2 should be
skipped. See MshPRFv1.0.1 section 3.10.4.1.
|
|
|
|
|
|
| |
If we are in IV update in progress state, and receive a Secure Network
beacon with an IV index equal to last known IV index + 1, and IV update
flag set to 1, it should be ignored. See MshPRFv1.0.1 section 3.10.5.
|
|
|
|
|
|
|
| |
If this node is a member of a primary subnet and receives a Secure Network
beacon on a secondary subnet with an IV Index greater than the last known
IV Index of the primary subnet, the Secure Network beacon shall be ignored.
See MshPRFv1.0.1 section 3.10.5.
|
|
|
|
|
|
| |
When replying to a HB subscription get message, and the current state of
source or destination fields is zero (which means that HB subscription
is disabled), all fields in the status reply should be zero.
|
|
|
|
|
|
|
|
|
| |
If heartbeat subscription is disabled, all fields should be set to zero
but collected data should be preserved. If HB subscription is enabled,
the collected data should be reset (which includes Min Hops = 0x7f).
HB subscription is disabled by setting any of the following fields to
zero: Source, destination or period log.
HB subscription is enabled by setting all the same fields to valid values.
|
|
|
|
|
|
| |
If a Config Heartbeat Publication Set message is unsuccessfully
processed, the fields in the status reply should be the same as in the
original message. See MshPRFv1.0.1 section 4.4.1.2.15.
|
|
|
|
|
| |
Fixed the log transformation to correctly follow the value mapping
defined in the mesh profile (section 4.1.2).
|
|
|
|
|
|
|
|
|
|
|
| |
1. Re-structures MGMT handling such that it is used to detect kernel
support of the mesh MGMT opcodes and events before selecting between
using MGMT or the legacy raw HCI socket method.
2. Re-structures main() to allow command line to prefer MGMT over HCI or
visa versa, plus optionally pass an explicte controller.
3. Adds mesh-io-mgmt as a transport.
|
|
|
|
|
|
| |
Because provisioning is not speed dependent, Timing on outbound PB-ADV
packets have been modified to be less likely missed by remote controlers
with looser timing capabilities.
|
|
|
|
|
| |
If a known appkey is added for a different netkey, the status reply
should be Invalid NetKey.
|
|
|
|
|
|
| |
If processing failed for a Config Model Subscription Virtual Address
Add/Delete/Overwrite message, the address field in the status reply
should be set to zero. See MshPRFv1.0.1 section 4.4.1.2.8.
|
|
|
|
|
|
|
| |
It is not stated in the mesh profile that the RFU bits in a Model
Publication Set message have to be zero. In fact, PTS test
MESH/NODE/CFG/MP/BV-01-C is sending that command with non-zero RFU and
expects a reply.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
According to the mesh profile (3.4.5.2), if TTL is set to 1 for an
outgoing message, that message shall be dropped.
|
|
|
|
|
|
| |
This memory leak will never happen, however since we added a new
return from function that malloc'd memory, the free should still be
done.
|
|
|
|
|
| |
Some versions of the GCC compiler complain when the return value of
snprintf is not checked. This patch cleans up the Mesh JSON parser.
|
|
|
|
|
|
|
|
| |
For received CTL mesh messages, the wrong network ID variable was
passed to ctl_received. This patch changes to the correct variable.
Also, changed type of net_key_id argument in ctl_received function
to be consistent wich the whole call chain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When there is a backlog of mesh packets to be sent, the packet sender
Fix bug where bluetooth-meshd stops sending
When there is a backlog of mesh packets to be sent, the packet sender
incorrectly infers that the tx worker thread is already running
and therefore needn't be invoked. As a result, the mesh daemon will
sometimes stop broadcasting while there are still packets in the queue.
It will not resume broadcasting.
This patch will invoke the tx worker thread correctly in that case.
The logic to send packets at least twice when the transmitter is idle
was slightly modified accordingly, and should behave the same way as
before.
|
|
|
|
|
|
|
| |
snprintf performs it's own range checking and returns a negative value
if string construction fails. Not checking the return value throws a
warning at compile time on GCC 12 and later. This patch removes
redundent range chacking and checks all snprintf return values.
|
| |
|