Skip to content
Commit 67a33ed1 authored by Krzysztof Kopyściński's avatar Krzysztof Kopyściński Committed by Anas Nashif
Browse files

Bluetooth: Mesh: fix Random value generation for Private Beacons



In `private_random_update`, when first beacon is advertised, there could
be a case when uptime is less then interval * 10s
(`priv_random.timestamp` is equal to 0 for first beacon). Then, Private
Random value will not be generated and will be set to all zeros.

New Private Random must also be generated  before Random Interval
expires, when KR or IVU flags are changed. Reset timestamp to 0 on
`bt_mesh_beacon_update` to generate new Random value.

Do not generate new private random if it won't be used (Private Beacon
state is not enabled).

Signed-off-by: default avatarKrzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
parent b020c5d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment