From eee9e47cac1ee247731dc1eb0aac6fb04a9998a6 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 25 Oct 2019 13:27:30 +0000 Subject: [PATCH] Transport: Publish IPv6 address on transition to non-firewalled (ticket #2175) --- history.txt | 33 +++++++++++++++++-- .../src/net/i2p/router/RouterVersion.java | 2 +- .../router/transport/udp/UDPTransport.java | 16 ++++++++- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/history.txt b/history.txt index d5d648e11c..d69e305beb 100644 --- a/history.txt +++ b/history.txt @@ -1,6 +1,35 @@ +2019-10-25 zzz + * Router (proposal 144): + - Set client SKM based on configured encryption + - Select target key in LS based on local client's support + - Hook new SKMs and engines into Garlic Message encryption/decryption + * Transport: Publish IPv6 address on transition to non-firewalled + (ticket #2175) + +2019-10-24 zzz + * Router: New SKMs and Engines for Ratchet (proposal 144) + 2019-10-23 zzz - * Build: Recognize gettext 0.20 - * Data: Reduce SessionTag size + * Build: + - Recognize gettext 0.20 + - Make 3 release targets, with jbigi/geoip/neither + * Crypto: + - New KeyFactory interface + - Base classes for ECIES-Ratchet (proposal 144) + * Data: + - Reduce SessionTag size + - Cache public key in private key class + - Add LeaseSet methods to get encryption key by type + * I2CP: + - Fix error message for config errors (ticket #2639) + - Add config to disable loopback for testing + * i2ptunnel: Add encrytion type selection to form (proposal 144) + * NetDb: Don't garlic encrypt netdb messages with a ECIES key + * Router (proposal 144): + - Add KeyManager support for multiple leaseset private keys + - Fix logic error in check for local destinations + - Register all LS2 keys with KeyManager + * Startup: clients.config.d files must end in ".config" * 2019-10-22 0.9.43 released diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 87e5bffca0..282c18b422 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 1; + public final static long BUILD = 2; /** for example "-test" */ public final static String EXTRA = ""; diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index cf2eb8e2df..168bb2c883 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -878,7 +878,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority if (!isIPv4Firewalled()) setReachabilityStatus(Status.IPV4_OK_IPV6_UNKNOWN); } else if (ip.length == 16) { - // TODO this will set non-firewalled every time our IPv6 address changes + // TODO if we start periodically scanning our interfaces (we don't now), + // this will set non-firewalled every time our IPv6 address changes if (!isIPv6Firewalled()) setReachabilityStatus(Status.IPV4_UNKNOWN_IPV6_OK, true); } @@ -3092,6 +3093,19 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority status == Status.IPV4_UNKNOWN_IPV6_FIREWALLED || status == Status.IPV4_DISABLED_IPV6_FIREWALLED) { removeExternalAddress(true, true); + } else if ((old == Status.IPV4_OK_IPV6_FIREWALLED || + old == Status.IPV4_UNKNOWN_IPV6_FIREWALLED || + old == Status.IPV4_DISABLED_IPV6_FIREWALLED) && + (status == Status.OK || + status == Status.IPV4_UNKNOWN_IPV6_OK || + status == Status.IPV4_FIREWALLED_IPV6_OK || + status == Status.IPV4_DISABLED_IPV6_OK || + status == Status.IPV4_SNAT_IPV6_OK) && + _lastOurIPv6 != null && + !explicitAddressSpecified()){ + String addr = Addresses.toString(_lastOurIPv6); + int port = _context.getProperty(PROP_EXTERNAL_PORT, -1); + rebuildExternalAddress(addr, port, true); } } else { rebuildExternalAddress();