mesh: keep CTL bit when relaying Network PDU

This commit is contained in:
Matthias Ringwald 2019-10-22 22:38:31 +02:00
parent 0aa6ff4026
commit 689b15f3e1

View File

@ -396,7 +396,7 @@ static void mesh_network_send_a(void){
static void mesh_network_relay_message(mesh_network_pdu_t * network_pdu){
uint8_t ctl_ttl = network_pdu->data[1];
uint8_t ctl = ctl_ttl & 0x80;
uint8_t ctl_in_bit_7 = ctl_ttl & 0x80;
uint8_t ttl = ctl_ttl & 0x7f;
#ifdef LOG_NETWORK
@ -406,7 +406,7 @@ static void mesh_network_relay_message(mesh_network_pdu_t * network_pdu){
#endif
// prepare pdu for resending
network_pdu->data[1] = (ctl << 7) | (ttl - 1);
network_pdu->data[1] = ctl_in_bit_7 | (ttl - 1);
network_pdu->flags |= MESH_NETWORK_PDU_FLAGS_RELAY;
// queue up