Changeset 12544


Ignore:
Timestamp:
Jul 12, 2011, 12:30:17 PM (10 years ago)
Author:
jordan
Message:

(trunk libT) #4016 "blocklists loaded in Transmission should be used to filter DHT communication." -- fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/tr-udp.c

    r12543 r12544  
    193193    struct sockaddr_storage from;
    194194    tr_session *ss = sv;
     195    tr_address addr;
     196    tr_port port;
    195197
    196198    assert(tr_isSession(sv));
     
    200202    rc = recvfrom(s, buf, 4096 - 1, 0,
    201203                  (struct sockaddr*)&from, &fromlen);
     204
     205    /* don't process messages from blocked addresses */
     206    if( !tr_address_from_sockaddr_storage( &addr, &port, &from )
     207            || tr_sessionIsAddressBlocked( ss, &addr ) )
     208        return;
    202209
    203210    /* Since most packets we receive here are µTP, make quick inline
Note: See TracChangeset for help on using the changeset viewer.