Fixes a bug where last_seen_seq was taken from unreliable packets
This commit is contained in:
parent
29c8a3d77b
commit
4e2003d8ea
|
@ -588,15 +588,14 @@ static void unproc_thread(void) {
|
|||
goto next;
|
||||
}
|
||||
|
||||
if (hdr.is_reliable) {
|
||||
u8_t expected_seq = next_seq(h5.last_seen_seq_from_host);
|
||||
if (hdr.is_reliable && hdr.seq != expected_seq) {
|
||||
if (hdr.seq != expected_seq) {
|
||||
LOG_ERR("Seq expected %u got %u. Drop packet", expected_seq, hdr.seq);
|
||||
net_buf_unref(rx_buf);
|
||||
goto next;
|
||||
}
|
||||
h5.last_seen_seq_from_host = hdr.seq;
|
||||
|
||||
if (hdr.is_reliable) {
|
||||
/* Submit delayed work to ack the packet */
|
||||
k_delayed_work_submit(&ack_work, H5_RX_ACK_TIMEOUT);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue