jonas-schievink/rubble

LLCP updates are not applied when the event is missed

Open

#74 geöffnet am 30. Aug. 2019

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)Rust (58 Forks)user submission
area: link layergood first issuestatus: needs codetype: bug

Repository-Metriken

Stars
 (403 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

When we've stored an LLCP update, we need to apply it to the connection state after the correct connection event number (or "instant"). Currently, this is done here:

https://github.com/jonas-schievink/rubble/blob/71be7a1bfa596ffa0024be64257bb4165c12036c/rubble/src/link/connection.rs#L276-L281

However, this code is inside the RX handler, so if we happen to miss the event we're supposed to apply the update, we never do so, resulting in the connection being lost completely. This can be seen in the following log:

2.888649s - TRACE - #18 DATA(15->22)<- Header { LLID: DataCont, NESN: 1, SN: 1, MD: false, Length: 0 }, []
2.889144s - INFO - LLCP<- ConnectionUpdateReq(ConnectionUpdateData { win_size: 2, win_offset: 17, interval: 39, latency: 0, timeout: 500, instant: 29 })
...
2.963649s - TRACE - #28 DATA(11->18)<- Header { LLID: DataCont, NESN: 1, SN: 1, MD: false, Length: 0 }, []
2.964147s - TRACE - DATA(18->25): missed conn event #29
2.972340s - TRACE - DATA(25->32): missed conn event #30
2.980533s - TRACE - DATA(32->2): missed conn event #31
2.988725s - TRACE - DATA(2->16): missed conn event #32
2.996940s - TRACE - DATA(16->16): missed conn event #33
...

Event 29 is missed presumably due to interference, we never apply the update, all future events are missed because the connection state is now desynced.

Contributor Guide