[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call |
Date: |
Sat, 19 Jan 2008 10:39:11 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 |
Update of task #7675 (project lwip):
Open/Closed: Closed => Open
_______________________________________________________
Follow-up Comment #10:
After going through the changes made for this task, I think there might be
another bug in here. Since it's only from reading the code, I might be wrong
(then please tell me :):
Prior to the changes (processing the return value of TCP_EVENT_RECV), the raw
API relied on the application callbacks to always deallocate the pbuf it
received, regardless of the return value. Now (in tcp_input - tcp_in.c:326) we
rely on the pbuf 'recv_data' still being valid after the recv callback is
called. With old applications, this might lead to accessing a pbuf which is
already deallocated!
Increasing recv_data->ref doesn't help either, since behaviour might be mixed
(old apps free the pbuf, new apps + netconn API don't).
For a start, a simple ASSERT(recv_data->ref != 0) might work...
Note that this would not happen if we wouldn't ACK the data before trying to
give it to the recv callback, but we delayed that until after 1.3.0 since it
implies a rather big change in tcp_in.c :-(
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?7675>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Simon Goldschmidt, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Simon Goldschmidt, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/13
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Jonathan Larmour, 2008/01/14
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Frédéric Bernon, 2008/01/14
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call,
Simon Goldschmidt <=
- [lwip-devel] [task #7675] Enable to refuse data on a TCP_EVENT_RECV call, Simon Goldschmidt, 2008/01/19