pull/1795/head
Jason Rhinelander 3 years ago
parent e47d3098ac
commit 99b12940ad

@ -1091,14 +1091,12 @@ namespace llarp
service::Address addr{}; service::Address addr{};
for (const auto& [range, exitAddr] : exitEntries) for (const auto& [range, exitAddr] : exitEntries)
{ {
if (range.BogonRange() and range.Contains(dst)) if (
// we permit this because it matches our rules and we allow bogons:
(range.BogonRange() and range.Contains(dst))
// allow because the destination is not a bogon and the mapped range is not a bogon
or not IsBogon(dst))
{ {
// we permit this because it matches our rules and we allow bogons
addr = exitAddr;
}
else if (not IsBogon(dst))
{
// allow because the destination is not a bogon and the mapped range is not a bogon
addr = exitAddr; addr = exitAddr;
} }
// we do not permit bogons when they don't explicitly match a permitted bogon range // we do not permit bogons when they don't explicitly match a permitted bogon range
@ -1162,7 +1160,7 @@ namespace llarp
if (not maybe) if (not maybe)
{ {
var::visit( var::visit(
[&](auto&& addr) { [this](auto&& addr) {
LogWarn(Name(), " failed to ensure path to ", addr, " no convo tag found"); LogWarn(Name(), " failed to ensure path to ", addr, " no convo tag found");
}, },
to); to);
@ -1174,7 +1172,7 @@ namespace llarp
else else
{ {
var::visit( var::visit(
[&](auto&& addr) { [this](auto&& addr) {
LogWarn(Name(), " failed to send to ", addr, ", SendToOrQueue failed"); LogWarn(Name(), " failed to send to ", addr, ", SendToOrQueue failed");
}, },
to); to);

Loading…
Cancel
Save