Boost C++ Libraries: Ticket #10508: Hang occurs if tcp::socket.connect(endpt, errorcode) is called with reserved IP address https://svn.boost.org/trac10/ticket/10508 <p> boost::asio::ip::tcp::socket.connect( <a class="missing wiki">EndPt</a>, ec) hangs in detail/impl/socket_opps.ipp:472 on the call </p> <p> template &lt;typename <a class="missing wiki">SockLenType</a>&gt; inline int call_connect(<a class="missing wiki">SockLenType</a> msghdr::*, </p> <blockquote> <p> socket_type s, const socket_addr_type* addr, std::size_t addrlen) </p> </blockquote> <p> { </p> <blockquote> <p> return ::connect(s, addr, (<a class="missing wiki">SockLenType</a>)addrlen); &lt;== HANGS </p> </blockquote> <p> } </p> <p> if the IP address is Valid but reserved. 127.0.0.1 &amp; any established private network subnet address work fine with either a connection or an errorcode return specifying the connection was refused. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10508 Trac 1.4.3 Ron Hansen <thak@…> Tue, 16 Sep 2014 16:30:23 GMT <link>https://svn.boost.org/trac10/ticket/10508#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10508#comment:1</guid> <description> <p> The debug info at the call to connect(s, addr, (<a class="missing wiki">SockLenType</a>)addrlen) is: </p> <p> addr const socket_addr_type * 0x7fff5fbfe620 0x00007fff5fbfe620 sa_len <span class="underline">uint8_t '\0' '\0' sa_family sa_family_t '\x02' '\x02' sa_data char <a class="changeset" href="https://svn.boost.org/trac10/changeset/14" title="*** empty log message *** ">[14]</a> "\x15|\xc0" <a class="missing changeset" title="No changeset 0 in the repository">[0]</a> char '\x15' '\x15' <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> char '|' '|' <a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a> char '\xc0' '\xc0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/3" title="Tweak disclaimer text">[3]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/4" title="Tweak disclaimer formatting, again">[4]</a> char '\x02' '\x02' <a class="changeset" href="https://svn.boost.org/trac10/changeset/5" title="Boost customization">[5]</a> char 'z' 'z' <a class="changeset" href="https://svn.boost.org/trac10/changeset/6" title="New repository initialized by cvs2svn.">[6]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/7" title="Initial content for next-gen Boost website. ">[7]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/8" title="Initial content for next-gen Boost website. ">[8]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/9" title="*** empty log message *** ">[9]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/10" title="*** empty log message *** ">[10]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/11" title="Initial content for next-gen Boost website. ">[11]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/12" title="More things getting included from common. ">[12]</a> char '\0' '\0' <a class="changeset" href="https://svn.boost.org/trac10/changeset/13" title="*** empty log message *** ">[13]</a> char '\0' '\0' s boost::asio::detail::socket_type 22 22 addrlen size_t 16 16 </span></p> </description> <category>Ticket</category> </item> <item> <author>Ron Hansen <ron.hansen@…></author> <pubDate>Tue, 16 Sep 2014 16:40:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/10508#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/10508#comment:2</guid> <description> <p> iMac OSX 10.9.4<br /> Xcode 5.1.1 </p> <p> Above comment better formatted, I hope: </p> <p> addr const socket_addr_type * 0x7fff5fbfe620 0x00007fff5fbfe620<br /> sa_len <span class="underline">uint8_t '\0' '\0'<br /> sa_family sa_family_t '\x02' '\x02'<br /> sa_data char <a class="changeset" href="https://svn.boost.org/trac10/changeset/14" title="*** empty log message *** ">[14]</a> "\x15|\xc0"<br /> <a class="missing changeset" title="No changeset 0 in the repository">[0]</a> char '\x15' '\x15'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a> char '|' '|'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a> char '\xc0' '\xc0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/3" title="Tweak disclaimer text">[3]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/4" title="Tweak disclaimer formatting, again">[4]</a> char '\x02' '\x02'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/5" title="Boost customization">[5]</a> char 'z' 'z'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/6" title="New repository initialized by cvs2svn.">[6]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/7" title="Initial content for next-gen Boost website. ">[7]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/8" title="Initial content for next-gen Boost website. ">[8]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/9" title="*** empty log message *** ">[9]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/10" title="*** empty log message *** ">[10]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/11" title="Initial content for next-gen Boost website. ">[11]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/12" title="More things getting included from common. ">[12]</a> char '\0' '\0'<br /> <a class="changeset" href="https://svn.boost.org/trac10/changeset/13" title="*** empty log message *** ">[13]</a> char '\0' '\0'<br /> s = boost::asio::detail::socket_type 22 22<br /> addrlen = size_t 16 16 </span></p> </description> <category>Ticket</category> </item> </channel> </rss>