Commit Graph

5490 Commits

Author SHA1 Message Date
zzz
4acf0ecd05 Sybil: Register blocklist version with update manager
Fix "very close" message when configured for all routers
2021-04-05 08:05:17 -04:00
zzz
2eedfe5382 SSU: Add note about skew threshold 2021-04-04 13:56:13 -04:00
zzz
a2dde559f1 SSU: Don't call PS.expireInboundMessages() from messageReceived()
it's already called from IMF
2021-04-04 13:25:57 -04:00
zzz
de108dbc5e Tunnels: Fix build message timestamp check for ECIES records
Log tweaks
2021-04-04 13:21:07 -04:00
zzz
00d3965303 SSU: Log enhancement, fix possible log NPE 2021-04-03 17:12:49 -04:00
zzz
7ad7846f86 SAM: Remove subsessions when primary session closes 2021-04-03 15:25:20 -04:00
zzz
1307e5b2e0 SSU: Remove restrictions on IPv6 introducers (prop. 158)
WIP, not fully tested
Don't try to rebuild IPv4 address when IPv4 disabled
Don't bid on a peer if marked unreachable
Fail outbound immediately if no valid introducers
Reduce IPv6 too-close length check from 8 bytes to 4
Log tweaks
2021-04-03 15:24:03 -04:00
zzz
1b1b0f545f SSU: Fix dup IPv6 introducers 2021-04-02 09:30:29 -04:00
zzz
9b361ce71c NetDB: Negative cache LS received with zero leases
Ratchet: Don't schedule a reply to a LS with zero leases
2021-04-01 08:12:35 -04:00
zzz
562b86636a SSU: Update address when IPv6 introducers change (prop. 158)
Enable ipv6 check in locked_rebuild()
Change locked_needsRebuild() to return codes for ipv4/v6
Change locked_needsRebuild() for introducers so it only
returns true if more are available
Change rebuildExternalAddress() so we can do a rebuild of ipv6 without an IP
Only call rebuildIfNecessary() on peer drop if it could have been an introducer
Fix check in pickInbound() for support of AliceIP field
Log tweaks
2021-03-31 12:50:21 -04:00
zzz
8447086c59 Transport: Fix NTCP removing IPv4 address when SSU removes IPv6 address 2021-03-30 07:14:35 -04:00
zzz
fed3063f36 Transport: Don't open UPnP ports when force-firewalled 2021-03-29 14:15:42 -04:00
zzz
e6f5ab967e Transport: Don't open UPnP ports when hidden 2021-03-29 14:04:38 -04:00
zzz
953b64af4a SSU: Don't request introducers when hidden 2021-03-29 13:38:18 -04:00
zzz
e21a3a366b Router: Fix decryption of blinded leasesets
Reverse cache wasn't regenerated at midnight,
so decryption would fail after the first routing key change.
We had the rollover() method but it wasn't called.
2021-03-27 08:15:01 -04:00
zzz
684506b0be Transports: Don't open UPnP ports for disabled IPv4/v6 2021-03-25 08:46:00 -04:00
zzz
aecd8efcca SSU: Implement IPv6 introductions (proposal 158)
WIP
Offer intro key for IPv6
Pick introducers for IPv6
Publish address with IPv6 introducers
Reduce churn of selected introducers
Only adjust transport bid if they publish C cap
Log tweaks
2021-03-25 08:03:33 -04:00
zzz
5f39426073 NetDB: Don't note 'enabled floodfill' in event log every startup when forced on 2021-03-24 09:32:01 -04:00
zzz
0ab429e1ed NetDB: Sort published addresses for consistency 2021-03-23 08:17:38 -04:00
zzz
bd6d6426fd SSU: Try to fix IPv6 transition from firewalled to non-firewalled
state was right but published address wasn't updated because looking
in wrong place for saved ipv6 address
2021-03-23 08:14:17 -04:00
zzz
9a106cb326 I2NP: lookup message debug output fixes 2021-03-22 12:42:28 -04:00
zzz
bbfd94359b Tunnels: Don't count established routers as new in OBEP throttle (ticket #2245)
reported by zlatinb
patch from jogger
2021-03-22 12:38:57 -04:00
zzz
64695a8060 SSU: Fix persisting IPv6 firewalled state 2021-03-22 12:02:36 -04:00
zzz
86b49546c8 Sybil: Persist blocklist 2021-03-22 10:36:42 -04:00
zzz
12c4f43109 Transport: Better IPv6 address check
We don't want to match on "46"
2021-03-22 07:00:17 -04:00
zzz
d5fd754a25 Tunnels: Garlic encrypt ITBM to IBGW
WIP, see proposal 157.
Will not take effect until we actually send ITBMs.
Tested with regular VTBMs.
2021-03-21 09:25:47 -04:00
zzz
4e1848c336 I2CP: Ensure nickname properties are set 2021-03-20 12:58:14 -04:00
zzz
b55fbbf099 Boolean.valueOf() -> Boolean.parseBoolean() 2021-03-20 12:27:46 -04:00
zzz
005ac38742 Tunnels: Fix RED dropping for part. tunnels (Gitlab MR !24)
Part 1:
Change bandwidth estimate to exponential moving average
(Similar to Westwood+ Simple Bandwidth Estimator in streaming)
instead of 40 ms bucket.
Also use it for tunnel.participatingBandwidthOut stat.
Remove linear moving average code previously used for stat
Reduce RED threshold from 120% to 95% of limit

Part 2:
Fix the other part of RED which is the dropping calculation.
Previously, it simply used the bandwidth to start dropping if
it was higher than a threshold. The drop percentage rose from
0 to 100%, linearly, based on how far the bandwidth was
above the threshold. This was far, far from the RED paper.

Now, we follow the RED paper (see ref. in SyntheticREDQueue javadoc)
to calculate an average queue size, using the exact same
exponential moving average method used for bandwidth.
Similar to CoDel, it also includes a count of how long
the size is over the threshold, and increases the drop probability with the count.
The unadjusted drop probability rises from 0 to 2%
and then everything is dropped, as in the RED paper.
The low and high thresholds are configured at 77 ms and 333 ms of queued data, respectively.

The queue is "synthetic" in that there's not actually a queue.
It only calculates how big the queue would be if it were
a real queue and were being emptied at exactly the target rate.
The actual queueing is done downstream in the transports and in UDP-Sender.

The goals are, for an 80% default share, to do most of the
part. traffic dropping here in RED, not downstream in UDP-Sender,
while fully utilizing the configured share bandwidth.
If the router goes into high message delay mode, that means we are not dropping enough in RED.
Above 80% share this probably doesn't work as well.

There may be more tuning required, in particular to achieve the goal of "protecting" the UDP-Sender
queue and local client/router traffic by dropping more aggressively in RED.

This patch also improves the overhead estimate for outbound part. tunnel traffic at the OBEP.

Reviewed, tested, acked by zlatinb
2021-03-20 10:49:30 -04:00
zzz
03c657b466 javadoc fix 2021-03-19 13:02:35 -04:00
zzz
3615a9b235 SSU: Skip router addresses with introducers and '6' cap
for now, until implemented, see proposal 158
2021-03-19 11:36:17 -04:00
zzz
bd724d1e1f Transports: Enable 4/6 caps
Set i2np.transportCaps=false to disable
Fix NTCP2 address with host and caps after state transition
Bump -7
2021-03-16 08:59:22 -04:00
zzz
be863d643e SSU: Fix IPv6 addresses not being removed on some state transitions
Ensure IPv4/v6 peer tests are alternated
Reschedule peer test if result is UNKNOWN and a state transition is pending
Fix peer test last send time not being set in all cases
2021-03-15 07:37:08 -04:00
zzz
023a7fdebe NetDB: Queue RI file deletion and delete in a single thread
Do both writes and removes in the writer thread
As suggested by jogger http://zzz.i2p/topics/3082
log tweaks
2021-03-10 14:17:45 -05:00
zzz
77375148e3 NTCP: More NTCP 1 removal cleanup 2021-03-10 07:16:29 -05:00
zzz
5c232792cc SSU: Don't change ports in some cases 2021-03-10 07:03:33 -05:00
zzz
6e03300371 Throttle: Don't do exponential calculation unless necessary
Limit to ~5% < drop prob. < 100%
2021-03-09 09:59:33 -05:00
zzz
731bf920f6 Util: Consolidate dup BandwidthEstimator interfaces 2021-03-09 07:37:51 -05:00
zzz
c1c2f4bb2e UPnP: Reduce some log levels
of logggung that was added during IPv6 development
2021-03-08 09:14:19 -05:00
zzz
6a54af399d NTCP: Remove NTCP 1 suppport
Remove individual 1/2 enable config
Additional cleanup to follow
2021-03-08 09:05:32 -05:00
zzz
82b7eea5f0 SSU: Increase CoDel drop threshold at UDPSender queue
Increase min and max queue size
Tweak stats
Util: Allow creation of CoDel queues with non-default parameters
New params are tentative, may be adjusted later
2021-03-08 08:12:10 -05:00
zzz
e4c7ef183f SSU: Require confirmation for IPv6 firewalled state transitions 2021-03-06 08:18:16 -05:00
zzz
10d303aee5 Router: Increase rekey probability 2021-03-04 19:04:29 -05:00
zzz
fda53416d3 Transports: Prefer IPv6 temporary addresses if the kernel does
This helps us pick the right address at startup,
so we don't switch after peer testing.
2021-03-04 08:42:08 -05:00
zzz
638d471d6b I2CP: Additional changes for release/API version split
Missed in previous checkin
2021-03-04 07:58:49 -05:00
zzz
10b90f45f0 UPnP: IPv6 part 12
Fix retention of deprecated messages
log tweaks, finals
2021-03-03 19:53:24 -05:00
zzz
ca1b6bbe42 SSU: Fix replaceAddress() for multiple addresses without host/port 2021-03-03 12:37:21 -05:00
zzz
3fbe4ed7e8 SSU: Increase hole punch rate limit 2021-03-03 11:21:49 -05:00
zzz
c36c8678ed NTCP: Fix reachability status when force-firewalled 2021-03-03 11:08:57 -05:00
zzz
c3099c7cfa SSU: Don't publish IPv4 address at startup when force-firewalled
Publish empty '4' address if firewalled and no introducers
Publish empty '6' address if firewalled
4/6 caps fixes
2021-03-03 10:36:44 -05:00