[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t)
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t) |
Date: |
Mon, 01 Feb 2010 15:47:14 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 |
Follow-up Comment #19, bug #27352 (project lwip):
Well, if it's only for IPv4 it really doesn't make a difference whether we
copy a pointer or the actual address, does it?
And it's the cleanest thing to do anyway since we had that bug where someone
tried to dereference the address pointer in a recv callback after freeing the
pbuf it was located in (since it's currently a pointer into the pbuf). We
solved it by adding documentation that the address is only valid until the
pbuf is freed, but I think comment #6 a) is the cleaner solution.
Only to make sure we all agree on the same thing: My proposed solution copies
the address onto the stack (e.g. in udp_input()) before calling the
application's recv function and passing a pointer to that stack-variable (OK,
that's one extra copy) and the netconn API must copy that address into the
netbuf (instead of copying its pointer) - except for TCP.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?27352>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Simon Goldschmidt, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t),
Simon Goldschmidt <=
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Simon Goldschmidt, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/01
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Simon Goldschmidt, 2010/02/02
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/02
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Bill Auerbach, 2010/02/02
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Simon Goldschmidt, 2010/02/02
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Simon Goldschmidt, 2010/02/04
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Stephane Lesage, 2010/02/04
- [lwip-devel] [bug #27352] Change ip_addr from struct to typedef (u32_t), Stephane Lesage, 2010/02/05