<p></p>
<p>When using new network, the tests use an IPv6-based localhost address for binding and connecting.</p>
<p>The local socket is opened in <code>setUp</code>:</p>
<div class="highlight highlight-source-smalltalk"><pre>setUp

        listenerSocket <span class="pl-k">:=</span> <span class="pl-c1">Socket</span> newTCP <span class="pl-c1">listenOn:</span> <span class="pl-k">self</span> listenerPort <span class="pl-c1">backlogSize:</span> <span class="pl-c1">4</span> <span class="pl-c1">interface:</span> <span class="pl-k">self</span> listenerAddress.</pre></div>
<p>The <code>listenerAddress</code> is derived as follows:</p>
<div class="highlight highlight-source-smalltalk"><pre><span class="pl-k">^</span> <span class="pl-c1">NetNameResolver</span> <span class="pl-c1">addressForName:</span> <span class="pl-s"><span class="pl-pds">'</span>localhost<span class="pl-pds">'</span></span></pre></div>
<p>In <code>oldNetwork</code>, that's an IPv4, in <code>!oldNetwork</code> that's an IPv6. <em>this is good</em></p>
<p>However, the <em>Socket</em> is created as <code>newTCP</code>, that is, <em>explicitely IPv4</em>:</p>
<div class="highlight highlight-source-smalltalk"><pre>newTCP
        <span class="pl-c"><span class="pl-c">"</span>Create a socket and initialise it for TCP<span class="pl-c">"</span></span>
        <span class="pl-k">^</span><span class="pl-k">self</span> <span class="pl-c1">newTCP:</span> <span class="pl-c1">SocketAddressInformation</span> addressFamilyINET4</pre></div>
<p>This is bad. This is where the Error message comes from.</p>
<p>This should be changed to use the address familty that fits best to the current old/new-network.</p>
<p>On top of that,  <code>#listenOn:backlogSize: interface:</code>  <em>solely</em> deals with IPv4 adresses.</p>
<p>The correct way is to use the indirection of <code>SocketAddressInformation</code> in <code>#listenWithBacklog:</code>.<br>
This deals correctly with the address family.</p>
<p>Things to do:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> fix the test setup to use the SAI info and/or discriminate old/new network</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> maybe Bail in the socket plugin earlier when a new-network socket is used in old-network-ipv4-only code.</li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/428#issuecomment-694231185">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW6LASGALFSDFAXIWJTSGIE6BANCNFSM4I44ENOA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW2QGTNJO7C7ENMTD4TSGIE6BA5CNFSM4I44ENOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFFQSBEI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/428#issuecomment-694231185",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/428#issuecomment-694231185",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>