Changeset 2a6ca4f for irc.c


Ignore:
Timestamp:
2006-01-04T11:16:58Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0196c47
Parents:
13c4cd3
Message:

Better handling of IPv4 connections in IPv6 mode. (Wrapping/Unwrapping of ::ffff:style addresses.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r13c4cd3 r2a6ca4f  
    8383                        irc->myhost = g_strdup( peer->h_name );
    8484                else if( inet_ntop( AF_INETx, &sock->sin6_addr, buf, sizeof( buf ) - 1 ) != NULL )
    85                         irc->myhost = g_strdup( buf );
     85                        irc->myhost = g_strdup( ipv6_unwrap( buf ) );
    8686        }
    8787#else
     
    102102                        irc->host = g_strdup( peer->h_name );
    103103                else if( inet_ntop( AF_INETx, &sock->sin6_addr, buf, sizeof( buf ) - 1 ) != NULL )
    104                         irc->host = g_strdup( buf );
     104                        irc->host = g_strdup( ipv6_unwrap( buf ) );
    105105        }
    106106#else
     
    114114#endif
    115115       
     116        /* Rare, but possible. */
    116117        if( !irc->host ) irc->host = g_strdup( "localhost." );
    117118        if( !irc->myhost ) irc->myhost = g_strdup( "localhost." );
Note: See TracChangeset for help on using the changeset viewer.