[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7808] IPv6: Add IPV6_V6ONLY functionality
From: |
James Smith |
Subject: |
[lwip-devel] [patch #7808] IPv6: Add IPV6_V6ONLY functionality |
Date: |
Thu, 28 Jun 2012 08:32:36 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24 |
Follow-up Comment #2, patch #7808 (project lwip):
Ivan says in comment#1
> Could you summarize the RFC requirement, please?
Basically RFC#3493 states that by default AF_INET6 sockets should allow IPv4
connections, but if an application explicitly wants to ignore IPv6 connections
on its IPv6 sockets then it should use the IPV6_V6ONLY option.
Here is a quote of (most) of the relevant section, since it is not too large
(from http://www.faqs.org/rfcs/rfc3493.html):
5.3 IPV6_V6ONLY option for AF_INET6 Sockets
This socket option restricts AF_INET6 sockets to IPv6
communications only. As stated in section
<3.7 Compatibility with IPv4 Nodes>, AF_INET6 sockets
may be used for both IPv4 and IPv6 communications.
Some applications may want to restrict their use of an
AF_INET6 socket to IPv6 communications only. For these
applications the IPV6_V6ONLY socket option is defined.
When this option is turned on, the socket can be used to
send and receive IPv6 packets only. ...
...
Note - This option has no effect on the use of IPv4 Mapped
addresses which enter a node as a valid IPv6 addresses for
IPv6 communications as defined by Stateless IP/ICMP
Translation Algorithm (SIIT) [5].
Ivan says in comment#1
> ... I will try to implement it ...
Addmittedly the patch I supplied just provides the IPV_V6ONLY sockopt handling
AND a solution for the sequential API (the RAW API users can always call
tcp_listen or tcp_listen_dual as appropriate for their use of lwIP).
However, with the patch applied to the HEAD I can successfully create and
listen on an AF_INET6 socket and have IPv4 or IPv6 clients attach, so what is
in the HEAD "works" with the patch applied. So I think all of the heavy
lifting had already been done and is in the HEAD, since all I had to do (and
what is in the patch) is ensure tcp_listen_dual is called if IPV6_V6ONLY has
NOT been set.
The caveat is that limited testing has been done so far, since I needed to put
this patch in place to allow our stress test setup to operate and to start
making use of lwIP IPv6 support. So far though I have run quite a few test
sessions with IPv4 clients successfully connecting and transferring data
to/from the IPv6 socket.
Admittedly on one architecture I did encounter an assert from within lwIP when
doing a lot of large packet IPv6 transfers; but that issue is more than likely
unrelated to this "allow IPv4 connections by default" change (and is on my
debug pile to investigate :-)
Cheers,
-- Jamie
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7808>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/