]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Allow ipv4 wildcard binds after ipv6 address binds
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 24 Mar 2009 16:24:49 +0000 (16:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Mar 2009 02:49:10 +0000 (19:49 -0700)
commit5d800c11299a67405192a34e7a46e67d3808fb41
treeb1b5afc7a0c0475286dee7562cde523c9fbcdabe
parent00e716173d00e7e773dac654aa4618c06e89e5c1
ipv6: Allow ipv4 wildcard binds after ipv6 address binds

The IPv4 wildcard (0.0.0.0) address does not intersect
in any way with explicit IPv6 addresses.  These two should
be permitted, but the IPv4 conflict code checks the ipv6only
bit as part of the test.  Since binding to an explicit IPv6
address restricts the socket to only that IPv6 address, the
side-effect is that the socket behaves as v6-only.  By
explicitely setting ipv6only in this case, allows the 2 binds
to succeed.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/af_inet6.c