[bug #55987] lwip_recvmsg does not return sender's address/port

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #55987] lwip_recvmsg does not return sender's address/port

Simon Goldschmidt
URL:
  <https://savannah.nongnu.org/bugs/?55987>

                 Summary: lwip_recvmsg does not return sender's address/port
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: rossetyler
            Submitted on: Sat 23 Mar 2019 04:43:21 PM UTC
                Category: UDP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.3

    _______________________________________________________

Details:

When using asio async_receive_from, in the esp-idf (v3.2-beta3), the sender's
endpoint is not filled in because lwip_recvmsg ignores the
msghdr->msg_name{,len} it is given. Although this information is available in
lwip_recvfrom, it does not return it because lwip_recvmsg gives it NULL.

The same boost::asio code works fine on Linux.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?55987>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #55987] lwip_recvmsg does not return sender's address/port

Simon Goldschmidt
Follow-up Comment #1, bug #55987 (project lwip):

I don't really get it. v2.0.3 did not provide 'recvmsg' and from reading the
code, current master seems to handle this just fine.

Could you be more precise? Which version are you using and where is this
"gives it NULL" you reference?

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?55987>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #55987] lwip_recvmsg does not return sender's address/port

Simon Goldschmidt
Follow-up Comment #2, bug #55987 (project lwip):

At the time of this bug submission, I was using Espressif esp-idf v3.2-beta3

https://github.com/espressif/esp-idf/releases/tag/v3.2-beta3
> LWIP related
> New Functionality
> Updated LWIP to v2.0.3 with Espressif patches

lwip_recvmsg calls lwip_recvfrom with NULL, NULL ...
https://github.com/espressif/esp-lwip/blob/e2a24de6603c896a5ddacac296c0304002376eae/src/api/sockets.c#L1284

ssize_t recvd_local = lwip_recvfrom(s, message->msg_iov[i].iov_base,
message->msg_iov[i].iov_len, recv_flags, NULL, NULL);

... even though it was given msghdr->msg_name{,len}










    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?55987>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #55987] lwip_recvmsg does not return sender's address/port

Simon Goldschmidt
Update of bug #55987 (project lwip):

                  Status:                    None => Invalid                
             Assigned to:                    None => goldsimon              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #3:

OK, another vendor creating version confusion. I hadn't really followed the
update espressif did although I saw they did update. As it seems they mixed
2.0.3 with a temporary (not release) git snapshot and in addition to that did
more changes instead of working with us to get good changes mainlined.

This should work for official lwIP, but obviously not for what espressif marks
as 2.0.3...

--> closing as invalid

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?55987>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel