Commit bb4ff33
committed
DYMO: fix: double-free of RREQ wait timer when route discovery is exhausted
processRreqWaitRrepTimer() deletes the wait-timer message at the end of the
method. On the final retry (retryCount == discoveryAttemptsMax - 1) it also
called deleteRreqTimer(target), which does `delete targetAddressToRREQTimer[target]`
-- and that entry IS the message being processed -- so the message was freed
twice (and `target`, a reference into the message, dangled for the rest of the
branch). This corrupts the heap and crashes; it triggers whenever a route
discovery runs out of attempts, e.g. once nodes shut down in the DynamicIPv6
scenario. Drop the redundant cancel/delete of the timer in that branch (the
message is deleted at the end) and take `target` by value.
Enables the manetrouting/dymo DynamicIPv6 fingerprint example (was ERROR,
"IPv6: Shutdown not supported"). Recorded with tplx;~tNl;tyf like its siblings
(DYMO has no packet serializer, so ~tND is not applicable).1 parent dfe270b commit bb4ff33
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | | - | |
311 | | - | |
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
0 commit comments