diff --git a/subsys/bluetooth/mesh/friend.c b/subsys/bluetooth/mesh/friend.c index a63bae47fbd..c4a4cc51f2d 100644 --- a/subsys/bluetooth/mesh/friend.c +++ b/subsys/bluetooth/mesh/friend.c @@ -432,7 +432,8 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd, return 0; } - BT_DBG("Re-encrypting friend pdu"); + BT_DBG("Re-encrypting friend pdu (SeqNum %06x -> %06x)", + meta.crypto.seq_num, bt_mesh.seq); err = unseg_app_sdu_decrypt(frnd, buf, &meta); if (err) { @@ -440,6 +441,8 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd, return err; } + meta.crypto.seq_num = bt_mesh.seq; + err = unseg_app_sdu_encrypt(frnd, buf, &meta); if (err) { BT_WARN("Re-encryption failed! %d", err);