bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
12 stars 8 forks source link

fix: bm cfg of non-neighbors with new link-local forwarding #35

Closed towynlin closed 11 months ago

towynlin commented 11 months ago

Prior to this PR, given a topology of 3 nodes A | B | C, running on node A any bm cfg command that targeted node C would fail. The reason was that config commands are sent to the link-local multicast address, and node B, upon finding that it was not the target of the message, simply dropped the packet.

This PR adds the ability in BCMP to forward messages in that scenario, using a feature described in section 5.4.4.2 of the Bristlemouth spec that had not previously been implemented.

One additional requirement relating to the link-local neighbors-only address, which can help cut down on unnecessary transmissions, is that granular messaging limited to a specific Port can be achieved by setting a destination address with the pattern:

ff02::000X:1

Wherein X represents the egress port on which to direct the packet (as opposed to all available ports by default). As with the equivalent global all-nodes address pattern, these four bits shall be cleared before transmission on the relevant port.

This addressing feature can help to support more efficient execution of higher-level Bristlemouth functions relating to neighbor discovery, capability negotiation, and resource discovery, as these exchanges carry information associated with specific neighbors and network segments, which may not be useful or relevant to nodes on other segments.


Other minor changes: