lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #45110] IPv6 sockaddr structures cleanups


From: Joel Cunningham
Subject: [lwip-devel] [bug #45110] IPv6 sockaddr structures cleanups
Date: Fri, 15 May 2015 14:08:08 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0

URL:
  <http://savannah.nongnu.org/bugs/?45110>

                 Summary: IPv6 sockaddr structures cleanups
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: jcunningham
            Submitted on: Fri 15 May 2015 02:08:06 PM GMT
                Category: sockets/netconn
                Severity: 2 - Minor
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

In familiarizing myself with LwIP's IPv6 implementation, I've spotted a couple
of minor issues with struct sockaddr changes for IPv6

1)  sockaddr_in6 doesn't contain sin6_scope_id as required by the Open Group
specification and RFC 3493. The Open Group specification lists sin6_scope_id
as one of the "minimum required fields".  Even if LwIP's implementation
doesn't currently support the scope ID, we should at least maintain
application compatibility with the structure.

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html
http://tools.ietf.org/html/rfc3493#section-3.4

2) The struct sockaddr has a separate sa_data define when LWIP_IPV6 is set
that adds extra bytes.  This is unnecessary because with the addition of IPv6,
sockaddr_storage should be used by applications when there needs to be storage
large enough for either a sockaddr_in or sockaddr_in6.

I doubled checked with the Steven's book: Unix Network Programming - Vol 1
Third Edition, which has been updated for IPv6.  The definition given in the
book for sa_data is 14 bytes and is unchanged for IPv6 additions.

I have provided a patch that addresses both of these minor issues



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 15 May 2015 02:08:06 PM GMT  Name:
0001-IPv6-sockaddr-clean-ups.patch  Size: 3kB   By: jcunningham

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

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45110>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]