P25: Clear Stale Keys when using the Keyloader and a CC Return is initiated via LCW or Logic on END_PTT;

This commit is contained in:
lwvmobile
2025-09-11 23:19:16 -04:00
parent 3aabd85604
commit b0a46a541d
2 changed files with 61 additions and 0 deletions

View File

@@ -310,6 +310,18 @@ void p25_lcw (dsd_opts * opts, dsd_state * state, uint8_t LCW_bits[], uint8_t ir
if (opts->p25_trunk == 1 && state->p25_cc_freq != 0 && opts->p25_is_tuned == 1)
{
//clear stale keys if loaded
if (state->keyloader == 1)
{
state->R = 0;
state->A1[0] = 0;
state->A2[0] = 0;
state->A3[0] = 0;
state->A4[0] = 0;
state->aes_key_loaded[0] = 0;
// state->H = 0; //shim for above (this apply here?)
}
//Will we need to check for a symbolrate change here, can a P25p2 TDMA-CC system
//revert back to a phase 1 traffic channel or carry a phase 1 traffic channel?
if (state->p25_cc_is_tdma == 1)