Parent: 58fb6dce58b119439cc513405e791a4910731eda
Author: Przemysław Fierek <przemyslaw.fierek@silvair.com>
Committer: Brian Gix <brian.gix@intel.com>
Date: 2021-03-01 19:09:03
Tree: 9baebb6cadba0ad501cf974b38460ddfa923a559
mesh: Fix infinite loop on IVIndex update This patch fixes inifinite loop problem caused by recurring call of the `net_key_beacon_refresh` function. Problem occurs when at least two nodes are connected to the same BlueZ instance and they are connected to the same network (use same network key). Issue is triggered when IVIndex update process stabilize and one of the nodes receives network beacon with IVUpdate flag set to 0. Then it processes the "local" beacon and compose new `snb` (with IVUpdate flag set to 0) attached to `net_key` instance. After that it calls `net_local_beacon` and another node processes the new beacon (this node has IVUpdate flag still set to 1). Note that the `net->ivupdate` has set value 1. The `update_iv_ivu_state` says that "IVU clear attempted too soon". The node composes new `snb` with IVUpdate flag set to 1 and writes it to the `net_key` instance in the `net_key_beacon_refresh` function. After that it calls `net_local_beacon` which causes repeat of all process. We are rotating in this loop until end-of-memory.
Diffstat
| M | mesh/net.c | | | 34 | +++++++++++++++++++++- - - - - - - - - - - - - |
1 files changed, 21 insertions(+), 13 deletions(-)