IPV6 - Attempt to fix tcp46 compatibility listen sockets
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Sep 2009 04:52:01 +0000 (21:52 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 10 Sep 2009 04:52:01 +0000 (21:52 -0700)
commit65f3e756b4a281b51547617519a0ec2dd28285c9
tree33f71a26fbec91fc966a991d59dea87848b95335
parentd66b98ebb623f903e93cd6590d34fc87135a4561
IPV6 - Attempt to fix tcp46 compatibility listen sockets

* When creating the accepted socket via the syncache, if the
  listen socket is INET6 but allows compatibility connections
  the inp created via sonewconn() will probably set IN6P_IPV6_V6ONLY.

  This flag must be cleared if the incoming connection is
  actually IPV4, otherwise tcp6_soport() will not properly
  fall through to tcp_soport().

* NOTE: Even though the connection is IPV4 the socket's protocol
  is copied from the listen socket which is INET6.  This seems
  to work ok but it isn't ideal.

* When connecting make sure that IPV6 connections use cpu 0 for
  now (we don't have a proper hash for IPV6 addresses yet).

Reported-by: corecode
sys/netinet/ip_demux.c
sys/netinet/tcp_syncache.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet6/ip6_demux.c
sys/netinet6/tcp6_var.h