mesh: Refactor Secure Network Beaconing
authorBrian Gix <brian.gix@intel.com>
Fri, 13 Dec 2019 20:15:05 +0000 (12:15 -0800)
committerAnupam Roy <anupam.r@samsung.com>
Wed, 18 Dec 2019 11:49:13 +0000 (17:19 +0530)
commit68803ed1ed745d364e9d29435cc4e53de5f911ff
treee30ab547340c19da983c9b4178a57abb918f06f7
parent91f576f7d6aaa02cdcdfa87cd63bb8d5caced138
mesh: Refactor Secure Network Beaconing

The daemon handles multiple nodes, that may or may not be on the same
mesh network.  While each node my be seperately configured to beacon or
not beacon, there is nothing gained (except redundent traffic) for each
node to beacon seperately.  Beaconing is therefore centralized with the
Network Key the SNB represents, with each *received* beacon delivered
to each node. But for SNBs generated, we keep a count of how many nodes
want beacons sent for a specific key. If 1 or more, we beacon, if 0
nodes want the beacon sent, then we do not beacon.

Change-Id: Id186b6e93d70b09553d585ee9cc4d1b8c7e8b268
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/mesh-io.c
mesh/net-keys.c
mesh/net-keys.h
mesh/net.c
mesh/net.h