Ignore:
Timestamp:
Dec 15, 2009, 7:39:01 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2667 "ignore martian addresses" -- revise the tests to tr_isValidPeerAddr() base
d on feedback from jch @ http://trac.transmissionbt.com/ticket/2667#comment:6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r9778 r9780  
    607607
    608608static tr_bool
    609 isIPv4MappedOrCompatAddress( const tr_address * addr )
    610 {
    611     return ( ( addr->type == TR_AF_INET6 )
    612                   && ( IN6_IS_ADDR_V4MAPPED( &addr->addr.addr6 )
    613                         || IN6_IS_ADDR_V4COMPAT( &addr->addr.addr6 ) ) );
     609isIPv4MappedAddress( const tr_address * addr )
     610{
     611    return ( addr->type == TR_AF_INET6 ) && IN6_IS_ADDR_V4MAPPED( &addr->addr.addr6 );
    614612}
    615613
     
    664662        && ( !isMulticastAddress( addr ) )
    665663        && ( !isIPv6LinkLocalAddress( addr ) )
    666         && ( !isIPv4MappedOrCompatAddress( addr ) )
     664        && ( !isIPv4MappedAddress( addr ) )
    667665        && ( !isMartianAddr( addr ) );
    668666}
Note: See TracChangeset for help on using the changeset viewer.