lwIP - A Lightweight TCP/IP stack - Bugs: bug #55037, lwip 2.1.0 socket raw api lack of...
You are not allowed to post comments on this tracker with your current authentication level.
bug #55037: lwip 2.1.0 socket raw api lack of IPv6 cmsghdr information
Submitter: | yanhc <yanhc> | ||
Submitted: | Fri 16 Nov 2018 03:03:11 PM UTC | ||
Category: | IPv6 | Severity: | 3 - Normal |
Item Group: | Feature Request | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Open | Planned Release: | None |
lwIP version: | 2.1.0 |
Sat 17 Nov 2018 03:40:14 AM UTC, comment #2: |
yanhc <yanhc> |
Fri 16 Nov 2018 04:13:07 PM UTC, comment #1: I think we already have code for this ready to be merged in patch #9554. I just haven't found the time to correctly review it... |
Simon Goldschmidt <goldsimon> |
Fri 16 Nov 2018 03:03:11 PM UTC, original submission:
Recently, I am using socket raw api to just receive ipv6 payload. In my project, I need the cmsghdr information. However, I found that there is only IPv4 cmsghdr support and no IPv6 cmsghdr support in "lwip_recvfrom_udp_raw" function in sockets.c. So I add the IPv6 cmsghdr support following the example of IPv4 in sockets.c and sockets.h which can be found the attached diff file.
|
yanhc <yanhc> |
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.
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-11-16 | yanhc | Attached File | - | Added diff.txt, #45448 |
Powered by Savane 3.13-02a9.
Corresponding source code
I Checked the patch #9554 and it really provides most of this post already except the pbuf_clone changes if I did not miss it.
I have another question.
Since I use SOCK_RAW to get exactly IPv6 payload info, however, I will receive all IPv6 packet include IPv6 header in the application. I notice that in line 1053 of ip6.c, the ipv6 header is added again as following:
#if LWIP_RAW
/* p points to IPv6 header again for raw_input. */
pbuf_add_header_force(p, hlen_tot);
/* raw input did not eat the packet? */
raw_status = raw_input(p, inp);
So why raw_input need the IPv6 header info? What is the motivation behind this? At least, I do not need the IPv6 header in my application since the cmsghdr has already provide destaddr information which maybe the most commonly used IPv6 header information.
Thanks!