Commit Graph

4940 Commits (dev)

Author SHA1 Message Date
dr7ana 9acac2c33e CI fixes
- oxen-logging updated to bump fmt version
- version bump oxen-logging to fix fmt version
- version bump oxen-mq to solve uniform distribution error
- misc errors introduced by above version bumps
- clang-format 14 -> 15
9 months ago
Jason Rhinelander ab606c48d4
Rename `add_braces` -> `ipv6_brackets`
"Braces" seemed misleading as usually that terms refers to `{}` rather
than `[]`, and also this only affects ipv6 addresses.
11 months ago
Jeff Becker fc050b3a09
fix issue #2179
when setting libunbound's upstream dns, we need to not pass in the square braces of an ipv6 address.
we also net udp handles have ipv6 address for the local ip.
12 months ago
GNU/LongYap 89c5c73be4
add #include <cstdint>
add #include <cstdint> to fix build error
12 months ago
Jason Rhinelander b48e8b23ea
Merge pull request #2106 from majestrate/fix-config-comment-typo-2023-01-05
fix typo in config comments
1 year ago
Jeff Becker d7d3a4e774
fix issue #2138
in rpc client, contention on a null lock happened.
fix this by making the sending of pings always done in the logic
thread. this is done by wrapping the lambda we made with EventLoop::make_caller()
1 year ago
Jason Rhinelander 366d0c1be9
Merge pull request #2128 from majestrate/oxend-defer-ping-2023-01-29
ping oxend after getting identity keys
1 year ago
dan 9bfe881a35 OMQ_Request handling logic change 1 year ago
dan b2e8cde64b working new endpoints
- added hotswap functionality
- map_exit and unmap_exit working
1 year ago
dan 0632e88de0 Make new header for json type conversions 1 year ago
Jeff Becker 02b392881b add llarp::service::Endpoint::map_exit 1 year ago
Jeff Becker 031e173f1a
ping oxend after getting identity keys
fixes #2125
1 year ago
dan d3e69fe3c5 added unmapexit and listexit endpoints 1 year ago
dan d37398a915 review comments 1 year ago
dan 13b01c86a6 Updated RpcServer Initialization and Logic
-- Moved all RPCServer initialization logic to rpcserver constructor
    -- Fixed config logic, fxn binding to rpc address, fxn adding rpc cats
    -- router hive failed CI/CD resulting from outdated reference to rpcBindAddr
    -- ipc socket as default hidden from windows (for now)
refactored config endpoint
    - added rpc call script (contrib/omq-rpc.py)
    - added new fxns to .ini config stuff
    - added delete .ini file functionality to config endpoint
    - added edge case control for config endpoint

add commented out line in clang-form for header reorg later
1 year ago
Jeff Becker c682247f87
fix typo in config comments
lokinetN -> lokitunN
1 year ago
Jeff Becker 2498a085db
rearrange cmake libraries
define relations and document them.
make responsibilies clear and consice.
1 year ago
Jeff Becker 4508c59cd3
redo includes to be consistent 1 year ago
drouhana 0edfe8ff83
IPC Socket Fixes (#2111)
* Updated RpcServer Initialization and Logic

-- Moved all RPCServer initialization logic to rpcserver constructor
-- Fixed config logic, fxn binding to rpc address, fxn adding rpc cats
-- router hive failed CI/CD resulting from outdated reference to rpcBindAddr
-- ipc socket as default hidden from windows (for now)
1 year ago
Thomas Winget fbfd70a35a Fix incorrect usage of oxen-logging syslog
Previously oxen-logging was erroneously hard-coded to use the target
"lokinet" for system logs.  Obviously this is wrong for anything else
which uses oxen-logging and the system log.  This changes our call to
add_sink to pass "lokinet" as the target rather than the config
filename, and updates oxen-logging to use that argument correctly.
1 year ago
dan dc7f3cee22 Replace cxxopts with CLI11
- Simiplifies CLI code for future modification
- filesystem library linked in cmake check_for_std_filesystem file
1 year ago
Jason Rhinelander 9929445970
Fix poll_block_hash being set in the wrong place 1 year ago
majestrate e1f1b8b1c7
Merge pull request #2066 from jagerman/another-obsolete-bs
Remove another obsolete bootstrap
1 year ago
majestrate 9edda9f101
Merge pull request #2055 from jagerman/fix-option-names
Fix missing option names, make [lokid]:rpc required
1 year ago
Thomas Winget 1e29465237 fix missing namespace 1 year ago
Thomas Winget c4c81cc9f8 I hate clang-format sometimes 1 year ago
Thomas Winget 3d71bbd1e4 log func should return a string instead 1 year ago
Thomas Winget d44ad497fd rvalue ref -> value 1 year ago
Thomas Winget 548ce5c3a2 invert packet direction on WINDIVERT_ADDRESS
We simply keep the WINDIVERT_ADDRESS struct given on recv, so when
using it for send we need to invert the direction (the Output bit)
1 year ago
Thomas Winget 5238c3f1a0 force windivert to recalc IP checksum 1 year ago
Thomas Winget 133cee0fd9 Remove obsolete/extraneous WouldLoop function
The DNS resolver code should not and can not be responsible for
preventing packet looping.
1 year ago
Thomas Winget a518e654c5 add much logging around dns and windivert 1 year ago
Jason Rhinelander e8d1361865
Remove another obsolete bootstrap
I found another defunct obsolete boostrap file on a few foundation
service nodes; this adds it to the list.
1 year ago
Jason Rhinelander f9db657f64
Make Default&Required or Required&Hidden compilation failures
Default & Required makes no sense: if we have a default it makes no
sense to make it required.  The previous behaviour when this was
specified was to force an (uncommented) value in the config with the
value, but this was only used in the test suite.

Required & Hidden makes no sense either: if it's required to be
specified we definitely don't want to hide it from the generated config
file.

These are now compile-time failures.
1 year ago
Jason Rhinelander 68bb74a95d
Make [lokid]:rpc setting required in SN mode
When running as a service node we can't do anything without a lokid rpc
URL, and we don't necessarily have a good default for it.

This makes it required so that we fail with an appropriate error message
(rather than connect timeouts) if it is not specified.
1 year ago
Jason Rhinelander c8ce78315d
Fix missing option names
At some point between 0.9.9 and 0.9.10 we removed the printing of option
names when a value doesn't have a default, but this means the config is
littered with things like:

    # This option sets the greater foo value.

with no actual option name printed out when there is no default.

This fixes it by always printing the option name in such a case, just
with an empty value, e.g.:

    # This option sets the greater foo value.
    #big-foo=
1 year ago
Thomas Winget bb14a7bd09
when in rome, remove duplicate includes 1 year ago
Jeff Becker 259114b51d
add omitted header
certain files needed to include either fstream and our shim for std::filesystem.
this includes fstream into our shim and includes this shim in places
that require fstream. this is done because some toolchains (cough
cough broke af arch linux amalgums) can have weird subsets of the
requirements of C++17 that overlap, except when they dont, denoted by
unknowable undisclosed circumstances.

this issue was reported by a user in the wild, and this fixes it.
1 year ago
majestrate 29da2a9943
Update llarp/service/endpoint.cpp
Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
2 years ago
Jeff Becker e5efe793ca
llarp::service::Endpoint::ReadyToDoLookup()
previously we had a checking style function that passes in an optional
defaulting to nullopt as a micro optimzation, this makes the code
unnessarily obtuse.

simplify this by splitting up into 2 functions,
one for getting the unique endpoints and one for checking if the
number of them is above the minimum.

add overload for ReadyToDoLookup() that checks against constant but
can do more in the future if desired to reduce the burden on future contributors.
2 years ago
Jeff Becker 3a8007cc3f
remove assert()
we_changed_our_state can accept the state we are in right now, so this
assert no longer is correct.
2 years ago
Jason Rhinelander 6a110a4f1b
RPC: fix "halt" command 2 years ago
Jason Rhinelander 40348b24e1
Fix crash on unbound cleanup
We need to make a copy here because (see comment).
2 years ago
Jason Rhinelander b8678a767e
Fix crashy race condition in shutdown
Query->Cancel() will remove the Query, but that introduces a race
condition where unbound may still try to invoke the callback (with a
no-longer-valid pointer) if we do it before the ub_ctx_delete call.

Move to it afterwards so that we only cancel things that unbound didn't
2 years ago
Jeff Becker 9aa6b64c1e
use std::shared_ptr for pending queries 2 years ago
Jason Rhinelander c7a133ac9c
windivert: avoid trying to send during shutdown
Occasionally during shutdown windivert will crash because a thread tries
sending after we've called wd::shutdown, which isn't allowed.  Add an
atomic bool to prevent this.
2 years ago
Jason Rhinelander cdc4c486c4
Add more stopping signals 2 years ago
Jason Rhinelander 2b5f1ee029
Remove bad assert
We do and should be able to call this multiple times during shutdown to
signal that we are advancing through shutdown.
2 years ago
Jason Rhinelander 3d429b353a
Don't raise log level on shutdown
If already below info (e.g. debug) it should stay there; we only want to
*lower* it to info if above info.
2 years ago
Thomas Winget 9960aed45c
stop-time debug statements 2 years ago