Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 08ac4112903daed3165da97fbcda1b82ba86fd6a
Ticket: 13d3af3ad5b8e8eb20d673962d442dd64a40af40
IPV6 only used for IPV4/IPV6 sockets on windows
User & Date: oehhar on 2013-09-23 14:19:05
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <h2>Platform</h2>
    Windows (Vista 32 bit)
    
    <h2>Issue</h2>
    It is tried to open an async cient socket to localhost.
    If localhsot has an IPV6 and an IPV4 address, only IPV6 is tried.
    If a service services only IPV4 sockets, the connect stalls.
    
    <h2>Symptom</h2>
    Test "socket-14.0" fails
    
    <h2>Remark</h2>
    Issue does not fail if socket is not async.
    
    <h2>Demo 1</h2>
    The client socket name does not get the IPV6 address in async mode.
    In consequence, the connect fails
    
    <verbatim>
    1 % proc accept {s a p} {
         puts $s bye
         close $s
         puts ok
    }
    2 % set server [socket -server accept -myaddr 127.0.0.1 0]
    sock272
    3 % set port [lindex [fconfigure $server -sockname] 2]
    61680
    4 % set client [socket -async localhost $port]
    sock492
    5 % fconfigure $client -sockname
    :: :: 61681
    6 % fconfigure $client -error
    connection refused
    </verbatim>
    
    <h2>Demo 2</h2>
    It works with syncroneous sockets.
    Two wish programs are opened:
    
    <h3>wish1: server</h3>
    
    <verbatim>
    1 % proc accept {s a p} {
         puts $s bye
         close $s
         puts ok
    }
    2 % set server [socket -server accept -myaddr 127.0.0.1 61680]
    sock272
    ok
    </verbatim>
    The text 'ok' is shown, when the lower commands are entered.
    
    <h3>wish2: client</h3>
    
    <verbatim>
    1 % set client [socket localhost 61680]
    sock468
    5 % fconfigure $client -sockname
    127.0.0.1 steinmeister 61720
    6 % fconfigure $client -error
    </verbatim>
    
  5. foundin changed to: "8.6.1"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "25. Channel System"
  15. title changed to: "IPV6 only used for IPV4/IPV6 sockets on windows"
  16. type changed to: "Bug"