From: dw6 Date: Fri, 4 Apr 2008 09:52:48 +0000 (+0000) Subject: don't connect when sockaddr is empty ipv6 only. ipv4 behaviour unknown. X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8fe6cb767a1b2acfec8b1017ea54a97a5b6863d3;p=senf.git don't connect when sockaddr is empty ipv6 only. ipv4 behaviour unknown. git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@781 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/Protocols/INet/ConnectedRawINetSocketHandle.cc b/Socket/Protocols/INet/ConnectedRawINetSocketHandle.cc index 45715cb..bb03831 100644 --- a/Socket/Protocols/INet/ConnectedRawINetSocketHandle.cc +++ b/Socket/Protocols/INet/ConnectedRawINetSocketHandle.cc @@ -83,7 +83,10 @@ senf::ConnectedRawV6SocketProtocol::init_client(int const & protocol, INet6Socke const { init_client(protocol); - clientHandle().connect(address); + if(address.boolean_test()){ + //only connect if socket is not [::]:0, this results in an irreversible binding to the lo interface (linux 2.6.15) + clientHandle().connect(address); + } } ///////////////////////////////cc.e////////////////////////////////////////