Changeset 10049


Ignore:
Timestamp:
Jan 31, 2010, 12:23:31 AM (12 years ago)
Author:
charles
Message:

#2778 (IPv6 PEX accepts garbage addresses) -- accept petch from jch to reject IPv6 addresses outside of 2000::/3 until the end of the 13th Baktun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.c

    r10018 r10049  
    631631            return (address[0] == 0xFF) ||
    632632                   (memcmp(address, zeroes, 15) == 0 &&
    633                     (address[15] == 0 || address[15] == 1));
     633                    (address[15] == 0 || address[15] == 1)) ||
     634                   /* Addresses outside of 2000::/3 are currently reserved,
     635                      but might be allocated at some future time.  Since
     636                      there are a lot of buggy peers pushing around such
     637                      addresses over PEX, we reject them until the end of
     638                      the 13th Baktun. */
     639                   (tr_time() < 1356130800 && (address[0] & 0xC0) != 0x20);
    634640            break;
    635641        }
Note: See TracChangeset for help on using the changeset viewer.