git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7779
e03df62e-2008-0410-955e-
edbf42e46eb7
{
if (!ip.empty() || ((IP != "*") && (IP != "127.0.0.1") && (!IP.empty()) && (IP != "::1")))
{
{
if (!ip.empty() || ((IP != "*") && (IP != "127.0.0.1") && (!IP.empty()) && (IP != "::1")))
{
+ /* The [2] is required because we may write a sockaddr_in6 here, and sockaddr_in6 is larger than sockaddr, where sockaddr_in4 is not. */
sockaddr* s = new sockaddr[2];
#ifdef IPV6
if (v6)
sockaddr* s = new sockaddr[2];
#ifdef IPV6
if (v6)
bool InspSocket::DoConnect()
{
bool InspSocket::DoConnect()
{
+ /* The [2] is required because we may write a sockaddr_in6 here, and sockaddr_in6 is larger than sockaddr, where sockaddr_in4 is not. */
sockaddr* addr = new sockaddr[2];
socklen_t size = sizeof(sockaddr_in);
#ifdef IPV6
sockaddr* addr = new sockaddr[2];
socklen_t size = sizeof(sockaddr_in);
#ifdef IPV6
break;
case I_LISTENING:
{
break;
case I_LISTENING:
{
+ /* The [2] is required because we may write a sockaddr_in6 here, and sockaddr_in6 is larger than sockaddr, where sockaddr_in4 is not. */
sockaddr* client = new sockaddr[2];
length = sizeof (sockaddr_in);
std::string recvip;
sockaddr* client = new sockaddr[2];
length = sizeof (sockaddr_in);
std::string recvip;