lib,pdcp_nr: make sure MAC-I is computed on SRBs, even when integrity is not active yet

This commit is contained in:
Robert Falkenberg 2022-05-06 13:48:18 +02:00 committed by Pedro Alvarez
parent c015540f54
commit 02cb2532f8
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ void pdcp_entity_nr::write_sdu(unique_byte_buffer_t sdu, int sn)
// Integrity protection
uint8_t mac[4] = {};
if (is_drb() && (integrity_direction == DIRECTION_TX || integrity_direction == DIRECTION_TXRX)) {
if (is_srb() || (is_drb() && (integrity_direction == DIRECTION_TX || integrity_direction == DIRECTION_TXRX))) {
integrity_generate(sdu->msg, sdu->N_bytes, tx_next, mac);
}
// Ciphering