lwIP - A Lightweight TCP/IP stack - Bugs: bug #2595, loopif results in NULL reference...
You are not allowed to post comments on this tracker with your current authentication level.
bug #2595: loopif results in NULL reference for incoming TCP packets
Submitter: | Andreas Stenius <kaos> | ||
Submitted: | Wed 19 Feb 2003 03:26:30 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | Crash Error | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | None |
Jump to the original submission
Sun 29 Apr 2007 10:35:04 AM UTC, comment #28: |
Simon Goldschmidt <goldsimon> |
Tue 24 Apr 2007 08:46:00 AM UTC, comment #27:
|
Simon Goldschmidt <goldsimon> |
Tue 24 Apr 2007 08:19:48 AM UTC, comment #26: Thank you for the patch. This version works with my RAW API FreeRTOS and unixsim build.
|
Tai-hwa Liang <atliang> |
Mon 23 Apr 2007 07:57:17 PM UTC, comment #25: I've checked this in, please test! |
Simon Goldschmidt <goldsimon> |
Mon 23 Apr 2007 06:31:43 AM UTC, comment #24: Thanks for the feedback. I'll check it in one of these days when I find the time creating a comment and adding the define into opt.h. |
Simon Goldschmidt <goldsimon> |
Mon 23 Apr 2007 01:13:48 AM UTC, comment #23: comment #22, supplemental:
|
Tai-hwa Liang <atliang> |
Sun 22 Apr 2007 09:40:40 AM UTC, comment #22: Reply to comment #20. The patch looks okay to me. Here are a few compilation issues I observed whilst building with Paradigm C++ Pro:
|
Tai-hwa Liang <atliang> |
Tue 17 Apr 2007 03:06:07 PM UTC, comment #21: Ok, I've tested the patch a little and although my application (for which I need the loopif for) does not work, the loopif itself works fine ;-)
|
Simon Goldschmidt <goldsimon> |
Tue 17 Apr 2007 08:44:50 AM UTC, comment #20: I have created a patch which should solve this problem. Note that to switch between multithreading (call netif->input directly as it puts the packet into an mbox) and raw-API only (put the packet into a linked list, let loopif_poll() fetch it), you have to define LOOPIF_MULTITHREADING to 1 or 0 (since we don't yet have an lwIP-wide switch to know this).
|
Simon Goldschmidt <goldsimon> |
Tue 17 Apr 2007 08:37:09 AM UTC, comment #19: RE comment #18:
|
Simon Goldschmidt <goldsimon> |
Tue 17 Apr 2007 02:59:40 AM UTC, comment #18: Sorry for the interruption. I'm the original poster of the thread "local connection failed on loopif, race?" as mentioned in comment #7. I have done a couple of tests with loopif plus RAW API based client/server on two different platforms(FreeRTOS and unixsim running on FreeBSD).
|
Tai-hwa Liang <atliang> |
Thu 12 Apr 2007 04:22:44 PM UTC, comment #17:
|
Simon Goldschmidt <goldsimon> |
Thu 12 Apr 2007 11:43:38 AM UTC, comment #16: Strictly the loopback interface could have other loopback addresses on it, as long as they are within the 127/8 address block. I've seen this done on other systems althugh the applications tend to be obscure. So it is possible, people sometimes use it, but it's not normal by any means. |
Jonathan Larmour <jifl> |
Thu 12 Apr 2007 10:59:56 AM UTC, comment #15: Yes, you're right about netif and its input function pointer. Note there is always will have to be remove I think.
|
Frédéric Bernon <fbernon> |
Thu 12 Apr 2007 06:33:40 AM UTC, comment #14: Funny ;-)
|
Simon Goldschmidt <goldsimon> |
Thu 12 Apr 2007 01:36:31 AM UTC, comment #13: Sorry, I'll phrase it differently as I see now it isn't easy English for non-native English speakers:
|
Jonathan Larmour <jifl> |
Thu 12 Apr 2007 01:12:05 AM UTC, comment #12:
|
Frédéric Bernon <fbernon> |
Thu 12 Apr 2007 12:44:34 AM UTC, comment #11: I think it is possible for someone to use NO_SYS=0 without tcpip_thread. Just because someone is using the raw API doesn't mean it is a single-threaded system - it may need to interact with other threads.
|
Jonathan Larmour <jifl> |
Thu 12 Apr 2007 12:07:25 AM UTC, comment #10: About comment #8, tcpip_callback doesn't seems to be used, except for PPP, so, associated code would have to be disable, like others tcpip_ functions, to reduce footprint, and only enable if necessary.
|
Frédéric Bernon <fbernon> |
Wed 11 Apr 2007 11:01:17 PM UTC, comment #9:
|
Frédéric Bernon <fbernon> |
Wed 11 Apr 2007 10:52:48 PM UTC, comment #8: I think making a call to tcpip_callback() with a suitable callback function and argument would solve a lot of these problems in one fell swoop!
|
Jonathan Larmour <jifl> |
Wed 11 Apr 2007 10:43:54 PM UTC, comment #7: Just, I also note some remarks in "local connection failed on loopif, race?" (forum's thread March 30th 2007):
|
Frédéric Bernon <fbernon> |
Wed 11 Apr 2007 06:27:59 PM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Wed 11 Apr 2007 03:05:45 PM UTC, comment #5: You could test for ETHARP_TCPIP_INPUT - that's what controls the presence of tcpip_input.
|
Jonathan Larmour <jifl> |
Wed 11 Apr 2007 09:36:13 AM UTC, comment #4: This is still open (for a while now...) and I must say I don't like the solution as it introduces 1 ms delay for each packet going over the loopif.
|
Simon Goldschmidt <goldsimon> |
Tue 02 Dec 2003 08:15:10 PM UTC, comment #3: My application is unfortunately not small, and uses a commercially licensed OS, so I can't provide any usefull source code. But I'll be able to help reproduce the bug on another platform (linux/unix?).
|
Andreas Stenius <kaos> |
Tue 02 Dec 2003 11:04:35 AM UTC, comment #2: is there a simple test program which segfaulted before the patch was applied and works now?
|
Jani Monoses <jani> |
Wed 30 Jul 2003 12:10:15 PM UTC, comment #1: Small fix in loopif to let tcp_output finnish off, before sent to ip_input. |
Andreas Stenius <kaos> |
Wed 19 Feb 2003 03:26:30 PM UTC, original submission:
When connecting to "localhost" with the loopif interface, tcp_output doesn't get the opportunity to finnish sending the segment before tcp_process gets it, resulting in tcp_process referencing pcb->unacked-> which still is NULL. |
Andreas Stenius <kaos> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-04-29 | goldsimon | Status | Ready For Test | Fixed | |
Open/Closed | Open | Closed | |||
2007-04-23 | goldsimon | Status | In Progress | Ready For Test | |
2007-04-17 | goldsimon | Attached File | - | Added loopif_linkedlist.patch, #12512 | |
2007-04-17 | atliang | Attached File | - | Added loopif-q.patch, #12510 | |
Attached File | - | Added loopif-q2.patch, #12511 | |||
2007-04-12 | goldsimon | Status | None | In Progress | |
Assigned to | None | goldsimon | |||
2003-05-07 | likewise | Summary | loopif results in NULL reference for incomming TCP packets |
Powered by Savane 3.13-0329.
Corresponding source code
OK, closing this as fixed as it seems to work ;-)