Opened 3 years ago

Closed 3 years ago

#1794 closed enhancement (fixed)

Enforce fetching minimum 2 different reseed server.

Reported by: backup Owned by: zzz
Priority: minor Milestone: 0.9.26
Component: www/reseed Version: 0.9.25
Keywords: Cc: backup
Parent Tickets:

Description

Current situation:
If one reseed server offers>100 RI a client is satisfied and stops fetching other servers.

Desired working:
We define MIN_RESEED_SERVER = 2
So a client has to fetch always two servers even if he got already >100 RI from the first one.

This is a protection against malicious/hijacked reseed server.

With i2p-net grow and (hopefully) more reseed server we can increase MIN_RESEED_SERVER step by step.

rough code idea:

[code]
Reseeder.java

++ private static final int RI_WANTED = 100;
++ private static final int MIN_RESEED_SERVER = 2;
++ int fetched_reseed_server = 0;

++ if (dl > 0) fetched_reseed_server++;
-- if (total >= 100)
++ if (total >= RI_WANTED && fetched_reseed_server >= MIN_RESEED_SERVER)

nice to have: expand normal log:
... System.out.println("Reseed complete, " + total + " received from "fetched_reseed_server" servers");

must have: expand fatal error log in router console ("Reseed failed. Only x servers reached, required y."), if fetched_reseed_server < MIN_RESEED_SERVER
... _checker.setError(_t("Reseed failed.") + ' ' +
code

A test reseed server which serves 102 RI is standing by.

Thanks very much,
backup

Subtickets

Change History (1)

comment:1 Changed 3 years ago by zzz

  • Milestone changed from undecided to 0.9.26
  • Resolution set to fixed
  • Status changed from new to closed

In 8990df38b6a7603cbcd2c44d8faf9690610d10c3 0.9.25-13

Note: See TracTickets for help on using tickets.