]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Now working in svn:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 5 Feb 2007 23:13:40 +0000 (23:13 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 5 Feb 2007 23:13:40 +0000 (23:13 +0000)
Client connections and port bindings on both ipv4 and ipv6
Server port bindings on both ipv4 and ipv6
Now broken due to this:
cloaking (cloaks ipv4 users in an odd way when built as ipv6 enabled)
DNS (query fd doesnt init properly)
...probably other stuff. Stay tuned.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6503 e03df62e-2008-0410-955e-edbf42e46eb7

src/users.cpp

index f47c33011634a6ad78289f12b783646d490df997..c3e52c80d09c6cdc5b2b3f07d3764e5a40154b7b 100644 (file)
@@ -808,7 +808,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        user_hash::iterator iter = Instance->clientlist->find(tempnick);
        char ipaddr[MAXBUF];
 #ifdef IPV6
-       if (socketfamily = AF_INET6)
+       if (socketfamily == AF_INET6)
                inet_ntop(AF_INET6, &((const sockaddr_in6*)ip)->sin6_addr, ipaddr, sizeof(ipaddr));
        else
                inet_ntop(AF_INET, &((const sockaddr_in*)ip)->sin_addr, ipaddr, sizeof(ipaddr));
@@ -849,7 +849,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
        New->signon = Instance->Time() + Instance->Config->dns_timeout;
        New->lastping = 1;
 
-       New->SetSockAddr(AF_FAMILY, ipaddr, port);
+       New->SetSockAddr(socketfamily, ipaddr, port);
 
        /* Smarter than your average bear^H^H^H^Hset of strlcpys. */
        for (const char* temp = New->GetIPString(); *temp && j < 64; temp++, j++)