lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #31177] tcp_slowtmr() can corrupt tcp_active_pcbs in s


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #31177] tcp_slowtmr() can corrupt tcp_active_pcbs in some cases.
Date: Fri, 25 Nov 2011 05:25:59 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0.1) Gecko/20100101 Firefox/8.0.1

Follow-up Comment #6, bug #31177 (project lwip):

I've prepared a patch for this which solves this by:

- putting all callback-calls at the end of tcp_slow/fasttmr
- marking a pcb as timer-touched at the start of the while-loop in the timer
functions (using an extra counter that is increased at the very start of the
timer functions)
- restarting the while-loop (from the beginning of the pcb list) if the
active-pcb-list has been changed during callbacks
- skipping pcbs that are already marked as touched.

This is only neede for the active pcb list. It leads to traversing the
active-pcb list multiple times if it is changed by a callback - but it's the
only possiblity I could think of to give application code the freedom to do so
in any callback.

(file #24447)
    _______________________________________________________

Additional Item Attachment:

File name: fix_31177.patch                Size:9 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?31177>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]