Changeset c06e320


Ignore:
Timestamp:
Mar 31, 2017 12:28:31 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5eefb8b2
Parents:
b810b79
Message:

SSU: When a IPv6 peer connects, trigger a IPv6 peer test, not a IPv4 one
Require two consecutive peer test results for some state transitions,
to prevent frequent transitions to firewalled and back

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    rb810b79 rc06e320  
     12017-03-31 zzz
     2 * SSU:
     3   - When a IPv6 peer connects, trigger a IPv6 peer test, not a IPv4 one
     4   - Require two consecutive peer test results for some state transitions,
     5     to prevent frequent transitions to firewalled and back
     6
     72017-03-29 zzz
     8 * SSU: Refactor PeerTestEvent out of UDPTransport
     9 * Throttle: Reduce threshold for probabalistic throttling
     10   on slow platforms (ticket #1964)
     11
    1122017-03-27 zzz
    213 * Blockfile: Include authentication strings in exports
     14 * Build: Suppress JarScanner warning during Debian build (ticket #1975)
    315 * Debian: Add missing addressbook.jar to package (ticket #1973)
    416 * SusiDNS: Add addressbook.jar to classpath, don't fail
  • router/java/src/net/i2p/router/RouterVersion.java

    rb810b79 rc06e320  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 12;
     21    public final static long BUILD = 13;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/transport/udp/UDPTransport.java

    rb810b79 rc06e320  
    8282    private final PacketBuilder _destroyBuilder;
    8383    private Status _reachabilityStatus;
     84    private Status _reachabilityStatusPending;
     85    // only for logging, to be removed
    8486    private long _reachabilityStatusLastUpdated;
    8587    private int _reachabilityStatusUnchanged;
     
    268270        _testEvent = new PeerTestEvent(_context, this, _testManager);
    269271        _reachabilityStatus = Status.UNKNOWN;
     272        _reachabilityStatusPending = Status.OK;
    270273        _introManager = new IntroductionManager(_context, this);
    271274        _introducersSelectedOn = -1;
     
    13461349                status != Status.DISCONNECTED &&
    13471350                _reachabilityStatusUnchanged < 7) {
    1348                 // IPv4 only for now
    1349                 _testEvent.forceRunSoon(false);
     1351                _testEvent.forceRunSoon(peer.isIPv6());
    13501352            }
    13511353        }
     
    31563158
    31573159            if (status != old) {
     3160                // for the following transitions ONLY, require two in a row
     3161                // to prevent thrashing
     3162                if ((old == Status.OK && (status == Status.DIFFERENT ||
     3163                                          status == Status.REJECT_UNSOLICITED ||
     3164                                          status == Status.IPV4_FIREWALLED_IPV6_OK ||
     3165                                          status == Status.IPV4_SNAT_IPV6_OK ||
     3166                                          status == Status.IPV4_OK_IPV6_FIREWALLED)) ||
     3167                    (status == Status.OK && (old == Status.DIFFERENT ||
     3168                                             old == Status.REJECT_UNSOLICITED ||
     3169                                             old == Status.IPV4_FIREWALLED_IPV6_OK ||
     3170                                             old == Status.IPV4_SNAT_IPV6_OK ||
     3171                                             old == Status.IPV4_OK_IPV6_FIREWALLED))) {
     3172                    if (status != _reachabilityStatusPending) {
     3173                        if (_log.shouldLog(Log.WARN))
     3174                            _log.warn("Old status: " + old + " status pending confirmation: " + status +
     3175                                      " Caused by update: " + newStatus);
     3176                        _reachabilityStatusPending = status;
     3177                        _testEvent.forceRunSoon(isIPv6);
     3178                        return;
     3179                    }
     3180                }
    31583181                _reachabilityStatusUnchanged = 0;
    31593182                long now = _context.clock().now();
     
    31633186                _reachabilityStatusUnchanged++;
    31643187            }
     3188            _reachabilityStatusPending = status;
    31653189        }
    31663190        if (status != old) {
Note: See TracChangeset for help on using the changeset viewer.