ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/s_bsd.c
(Generate patch)

Comparing ircd-hybrid-7.3/src/s_bsd.c (file contents):
Revision 1029 by michael, Sun Nov 8 13:10:50 2009 UTC vs.
Revision 1072 by michael, Wed Feb 17 22:58:23 2010 UTC

# Line 327 | Line 327 | add_connection(struct Listener *listener
327          new_client->localClient->ip.ss_len, new_client->sockhost,
328          sizeof(new_client->sockhost), NULL, 0, NI_NUMERICHOST);
329    new_client->localClient->aftype = new_client->localClient->ip.ss.ss_family;
330 #ifdef IPV6
331  if (new_client->sockhost[0] == ':')
332    strlcat(new_client->host, "0", HOSTLEN+1);
330  
331 <  if (new_client->localClient->aftype == AF_INET6 &&
335 <      ConfigFileEntry.dot_in_ip6_addr == 1)
331 >  if (new_client->sockhost[0] == ':')
332    {
333 <    strlcat(new_client->host, new_client->sockhost,HOSTLEN+1);
334 <    strlcat(new_client->host, ".", HOSTLEN+1);
333 >    strlcpy(new_client->host, "0", sizeof(new_client->host));
334 >    strlcpy(new_client->host+1, new_client->sockhost, sizeof(new_client->host)-1);
335    }
336    else
337 < #endif
342 <    strlcat(new_client->host, new_client->sockhost,HOSTLEN+1);
337 >    strlcpy(new_client->host, new_client->sockhost, sizeof(new_client->host));
338  
339    new_client->localClient->listener = listener;
340    ++listener->ref_count;

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)