mesh: Fix updating RPL for locally originated messages
We can implicitly trust locally originated messages, so there's no
need to burden the RPL with them.
@@ -519,6 +519,11 @@ static bool is_replay(struct bt_mesh_net_rx *rx)
{
int i;
+ /* Don't bother checking messages from ourselves */
+ if (rx->net_if == BT_MESH_NET_IF_LOCAL) {
+ return false;
+ }
+
for (i = 0; i < ARRAY_SIZE(bt_mesh.rpl); i++) {
struct bt_mesh_rpl *rpl = &bt_mesh.rpl[i];
