From 3933f807df692856a836311675bbe2a5c5743f18 Mon Sep 17 00:00:00 2001 From: imaginos Date: Mon, 31 Mar 2008 02:37:34 +0000 Subject: [PATCH] wasn't being to smart here, not totally portable when specifying IPPROTO_IP, use the protocol pass in for best portability git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@996 726aef4b-f618-498e-8847-2d620e286838 --- Csocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Csocket.cpp b/Csocket.cpp index bc70e009..fdcd23b9 100644 --- a/Csocket.cpp +++ b/Csocket.cpp @@ -212,7 +212,7 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA // this is a quick check to see if we can connect to this type of outside port (ipv6 or ipv4) // this doesn't do an actual connection (man connect), but its a great way to validate a possible connection canidate bool bContinue = false; - int iTestFD = socket( pRes->ai_family, SOCK_DGRAM, IPPROTO_IP ); + int iTestFD = socket( pRes->ai_family, SOCK_DGRAM, pRes->ai_protocol ); if( iTestFD >= 0 ) { if( connect( iTestFD, pRes->ai_addr, pRes->ai_addrlen ) != 0 )