SSU: Fix IPv6 introducers

Ensure introducers are required when force-firewalled
Log tweaks
This commit is contained in:
zzz
2021-04-08 14:20:31 -04:00
parent 02cf79c4c8
commit 009eb8c9f6
4 changed files with 23 additions and 4 deletions

View File

@@ -1,3 +1,14 @@
2021-04-08 zzz
* Debian: Fix link to compiler jar (Debian ticket #986474)
2021-04-05 zzz
* Build: Remove launcher code
* Console: Convert update versions to times for debug page
* Sybil: Register blocklist version with update manager
2021-04-04 zzz
* Tunnels: Fix timestamp checking for ECIES records
2021-04-03 zzz
* SAM: Remove subsessions when primary session closes
* SSU: Remove restrictions on IPv6 introducers (prop. 158)

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Git";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 11;
public final static long BUILD = 12;
/** for example "-test" */
public final static String EXTRA = "";

View File

@@ -543,8 +543,8 @@ class IntroductionManager {
byte[] aliceIP = alice.getIP();
int alicePort = alice.getPort();
boolean ipIncluded = ipSize != 0;
// here we allow IPv6, but only if there's an IP included
if (!isValid(aliceIP, alicePort, ipIncluded)) {
// here we allow IPv6
if (!isValid(aliceIP, alicePort, true)) {
// not necessarily invalid ip/port, could be blocklisted
if (_log.shouldWarn())
_log.warn("Rejecting relay req from " + alice + " for " + Addresses.toString(aliceIP, alicePort));
@@ -597,7 +597,7 @@ class IntroductionManager {
if (charlie == null) {
if (_log.shouldLog(Log.INFO))
_log.info("Receive relay request from " + alice
+ " with unknown tag");
+ " with unknown tag " + tag);
_context.statManager().addRateData("udp.receiveRelayRequestBadTag", 1);
return;
}

View File

@@ -2882,6 +2882,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
// must be published with '6' cap
if (!_context.getProperty(PROP_TRANSPORT_CAPS, ENABLE_TRANSPORT_CAPS))
return false;
if (isIPv6Firewalled())
return true;
switch (status) {
case REJECT_UNSOLICITED:
case DIFFERENT:
@@ -2894,6 +2896,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
} else {
if (config == IPV6_ONLY)
return false;
if (isIPv4Firewalled())
return true;
switch (status) {
case REJECT_UNSOLICITED:
case DIFFERENT:
@@ -2933,6 +2937,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
// must be published with '6' cap
if (!_context.getProperty(PROP_TRANSPORT_CAPS, ENABLE_TRANSPORT_CAPS))
return false;
if (isIPv6Firewalled())
return true;
switch (status) {
case REJECT_UNSOLICITED:
case DIFFERENT:
@@ -2946,6 +2952,8 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
} else {
if (config == IPV6_ONLY)
return false;
if (isIPv4Firewalled())
return true;
switch (status) {
case REJECT_UNSOLICITED:
case DIFFERENT: