Changeset 7561


Ignore:
Timestamp:
Dec 31, 2008, 9:25:52 PM (12 years ago)
Author:
jhujhiti
Message:

(trunk libT) Stop trying to connect to multicast addresses. Also, bump "funny
looking address" messages from tr_dbg to tr_err so I can get bug reports with
the message for once!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r7448 r7561  
    7474    /* be really aggressive in what we report */
    7575    if( a->type == TR_AF_INET && !( a->addr.addr4.s_addr & 0xff000000 ) )
    76         tr_dbg(  "Funny looking address %s from %s", tr_ntop_non_ts( a ), source );
     76        tr_err(  "Funny looking address %s from %s", tr_ntop_non_ts( a ), source );
    7777    /* /16s taken from ipv6 rib on 21 dec, 2008 */
    7878    /* this is really, really ugly. expedience over quality */
     
    9595        }
    9696        if( !good )
    97             tr_dbg(  "Funny looking address %s from %s", tr_ntop_non_ts( a ), source );
     97            tr_err(  "Funny looking address %s from %s", tr_ntop_non_ts( a ), source );
    9898    }
    9999}
     
    417417    assert( tr_isAddress( addr ) );
    418418
     419    /* don't try to connect to multicast addresses */
     420    if( addr->type == TR_AF_INET && ( addr->addr.addr4.s_addr & 0xe0000000 ) )
     421        return -EINVAL;
     422    if( addr->type == TR_AF_INET6 && ( addr->addr.addr6.s6_addr[0] & 0xff ) )
     423        return -EINVAL;
     424
    419425    if( ( s = createSocket( ( addr->type == TR_AF_INET ? AF_INET : AF_INET6 ),
    420426                            type ) ) < 0 )
Note: See TracChangeset for help on using the changeset viewer.