Ignore:
Timestamp:
Feb 8, 2009, 10:45:30 PM (13 years ago)
Author:
jhujhiti
Message:

(trunk libT) don't attempt to connect to (half-complete) ipv6 link-local addresses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r7842 r7849  
    463463}
    464464
     465static TR_INLINE tr_bool
     466isIPv6LinkLocalAddress( const tr_address * addr )
     467{
     468    if( addr->type == TR_AF_INET6 &&
     469            IN6_IS_ADDR_LINKLOCAL( &addr->addr.addr6 ))
     470        return TRUE;
     471    return FALSE;
     472}
     473
    465474tr_bool
    466475tr_isValidPeerAddress( const tr_address * addr, tr_port port )
    467476{
    468     if( isMulticastAddress( addr ) )
     477    if( isMulticastAddress( addr ) || isIPv6LinkLocalAddress( addr ) )
    469478        return FALSE;
    470479
     
    487496    assert( tr_isAddress( addr ) );
    488497
    489     if( isMulticastAddress( addr ) )
     498    if( isMulticastAddress( addr ) || isIPv6LinkLocalAddress( addr ))
    490499        return -EINVAL;
    491500
Note: See TracChangeset for help on using the changeset viewer.