Even if we have the public key of a node, for some packets we use the legacy channels (e.g., traceroute, NodeInfo, Routing) and those should use the channel corresponding to a node. In perhapsEncode(), the channel will be set back to 0 when we do use PKC. Also this clause will still pass if the client explicitly requested PKC:
Even if we have the public key of a node, for some packets we use the legacy channels (e.g., traceroute, NodeInfo, Routing) and those should use the channel corresponding to a node. In
perhapsEncode()
, the channel will be set back to 0 when we do use PKC. Also this clause will still pass if the client explicitly requested PKC:https://github.com/meshtastic/firmware/blob/439c1dec08a29beaa4939458aeb75a9924a67c74/src/mesh/Router.cpp#L497