- Return OK as Alice when only receiving msg 5, unless snatted (SSU 1 also)
- Allow and handle firewalled Charlie as Alice
- Only create peer test data once as Alice
- Store test status and send-to-Alice time in test state to support retransmission
- Don't delete state after sending msg 4 as Bob, for possible retransmission
- Check for IP mismatch from Charlie as Alice, abort test and assume good
- Check for port mismatch from Charlie as Alice and validate
- Skip unroutable addresses when searching through RI for the right one
- Respond to retransmitted msg 1 as Bob
- Respond to retransmitted msg 2 as Charlie
- Update Charlie timer to retransmit msg 5
- Only send Charlie RI to Alice (as Bob) if test was accepted
- Convert timers to SimpleTimer2 (SSU 1 also)
- Log tweaks
Most changes are relevant only if NTP is disabled or failed at startup.
- Require two peers that agree for transports to initialize time
- Briefly ban skewed peer when not initialized, so another peer will be the second sample
- Allow SSU2 to initialize time even for large skews
- Do not allow NTCP2 inbound to initialize time for large skews
- Disable SSU1 time initialization when SSU2 is enabled
- When SSU2 is disabled, allow SSU1 time initialization even for large skews
- Don't adjust to large inbound NTCP2 skews when not initialized
- Round time sent in NTCP2 DateTime block
- Adjust SSU2 skew for RTT
- Don't sort by absolute skew on SSU /peers tab so we can find median
- Only call System.currentTimeMillis() once in RouterClock.setOffset()
- Log tweaks
as Bob, to send to Charlie, if it fits.
Otherwise, delay sending relay intro, so the RI DSM gets there first.
This makes relay faster and more reliable.
Periodically clean _nonceToAlice
Log tweaks
containing a specific termination reason,
and create a post-termination handler directly from IES2 for any additional packets.
Don't do this unless we get intro key and validate static key in RI.
Don't blocklist the IP for a banned router unless we have validated
the static key to prevent spoofing.
Don't queue data packet after failure
Don't send additional terminations after receiving termination ack
Also removes the rebuildIfNecessary() call claimed to be removed in previous checkin.
Since we aren't thrashing any more, reschedule test after UNKNOWN results,
with the delay depending on current state.
log tweaks
to prevent thrashing.
Only rebuild in dropPeer() if the peer was a published introducer.
Only rebuild in addPeer() if the peer offered to relay and we need introducers.
COWAL caused problems because replaceAddress() was removing the wrong address,
since RouterAddress.equals() does not compare caps, so empty '4' and '6' addresses would be equal.
So we could temporarily end up with multiple v4/v6 addresses.
COWAL wasn't really buying us anything anyway.
Fix removeAddress() that called the listener even if no change.
and storing session request packet for retransmission
Previously, we would regenerate handshake state on every retry,
and we would not re-save the new session request packet after a retry.
Check for wrong token received in additional retries.
Handle skew reason in termination, possibly ban peer
Adjust clock at startup when terminated with skew reason
Don't send immediate termination to a too-close address
Javadoc fixes
Log tweaks
(rate limited) at conn limits or when alice is banned.
Process retry payload even if token is 0, to get termination reason
Wait longer for session request after retry, allowing for at least 2 retransmissions, to reduce IES2 failures
Ban peer if he bans us in retry
Remove unused writePayload()
Javadoc fixes
Log tweaks