[bug #56017] The addrlen get from getaddrinfo was wrong for IPv6 domain name translation

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

[bug #56017] The addrlen get from getaddrinfo was wrong for IPv6 domain name translation

Wilfred
URL:
  <https://savannah.nongnu.org/bugs/?56017>

                 Summary: The addrlen get from getaddrinfo was wrong for IPv6
domain name translation
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: kevingao
            Submitted on: Thu 28 Mar 2019 07:43:51 AM UTC
                Category: DNS
                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: git head

    _______________________________________________________

Details:

The addrlen should be set based on the address family, for AF_INET, it should
be sizeof(sockaddr_in), for AF_IENT6, it should be sizeof(sockaddr_in6)



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 28 Mar 2019 07:43:51 AM UTC  Name:
set-addrlen-based-on-address-family.patch  Size: 1013B   By: kevingao

<http://savannah.nongnu.org/bugs/download.php?file_id=46654>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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 #56017] The addrlen get from getaddrinfo was wrong for IPv6 domain name translation

Wilfred
Follow-up Comment #1, bug #56017 (project lwip):

The correct way is to use sockaddr_storage here. This is what Git HEAD is
doing, it was fixed in commit cca758d332.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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 #56017] The addrlen get from getaddrinfo was wrong for IPv6 domain name translation

Wilfred
Update of bug #56017 (project lwip):

                  Status:                    None => Wont Fix              
             Open/Closed:                    Open => Closed                


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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 #56017] The addrlen get from getaddrinfo was wrong for IPv6 domain name translation

Wilfred
Follow-up Comment #2, bug #56017 (project lwip):

why the addrlen should be set to the sizeof(sockaddr_storage)? I checked the
GLibc and found the addrlen was set based on the address family, pls refer the
source file getaddrinfo.c in glibc.

    _______________________________________________________

Reply to this item at:

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

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


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