Read-Only Related Mirrors
  1. Read-Only Related Mirrors

Github-rtrlib

Public
AuthorCommitMessageCommit dateIssues
Matthias BräuerTassilo TannebergerMatthias Bräuer
f3d1cfa59b3rtrlib: Make API consistent- To avoid name clashes and have a consistent API naming, every function, enum, struct, ... that is exported is prefixed with `rtr_`/`RTR_`. - `int` return types are changed to the pertinent `enum` type if applicable. - Change `bool` type to indicate the performed operation when notifying users about changes in the SPKI and PFX tables to specific `enum` type to improve readability and mak...
Matthias BräuerTassilo TannebergerMatthias Bräuer
e9d8dcc14e7rtr_mgr: Add callback to notify users when a new thread starts- Previously, it was not possible for users of the RTRlib to run arbitrary code once a processing thread for an RTR socket has been started. This commit adds an optional callback for notifying the user whenever a new thread has been started and in the future possibly about other events as well. - The callback can be configured when initializing the RTRlib.
Matthias BräuerTassilo TannebergerMatthias Bräuer
28dd0c1eab7 aspa: Replace existing ASPA record with new one- Whenever an ASPA announcement PDU is received and an ASPA record for that customer ASN already exists, the new record replaces the old one as defined in [draft-ietf-sidrops-8210bis-21]. - When an ASPA announcement and a withdrawal is received (in that order) within one response from the cache server, it is considered a no-op if the customer ASN doesn't exist yet; if it already exists,...
Matthias BräuerTassilo TannebergerMatthias Bräuer
598222b5fe8rtrlib: Fix typos and improve code-style
Matthias BräuerTassilo TannebergerMatthias Bräuer
b5a0dd0cd95tests: Use domain of TU dresden for live tests- Further, the tests `test_live_fetching` and `test_live_disabled_features` are added to the CTest test suite and thus will be executed when running `ctest`
Matthias BräuerTassilo TannebergerMatthias Bräuer
6da4d452648test_aspa: Add missing checks for number of sent error PDUs
Matthias BräuerTassilo TannebergerMatthias Bräuer
fff3205047brtr: Check for plausible length of ASPA PDU- [draft-ietf-sidrops-8210bis-21] specifies that an ASPA PDU must have a length that is divisible by 4 to be correct. This commit adds a check and if its length is not divisible by 4 a `Corrupt Data (0)` error is sent. - The unit tests in `test_aspa.c` are extended by checks for sent error PDUs. [draft-ietf-sidrops-8210bis-21]: https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-8...
Matthias BräuerTassilo TannebergerMatthias Bräuer
7fb3b1b636crtr: Readd removed `const` qualifier for `erroneous_pdu_len`
Matthias BräuerTassilo TannebergerMatthias Bräuer
61b6e0453b4rtr: Remove commented out check for `afi_flags`- The previous ASPA implementation contained an `afi_flags` field in the PDU, which doesn't exist (anymore) in the draft version 21. Thus, everything remaining to `afi_flags` is removed.
Matthias BräuerTassilo TannebergerMatthias Bräuer
9e2af03e029rtr: Remove unnecessary function
Matthias BräuerTassilo TannebergerMatthias Bräuer
ad25c27e509rtr: Readd removed `const` qualifier for `erroneous_pdu_len`
Matthias BräuerTassilo TannebergerMatthias Bräuer
c3d00532277Replace ellipsis by period in logs
Matthias BräuerTassilo TannebergerMatthias Bräuer
a23855777fbrtr_mgr: Change return type from `int` to enum- Although most functions within the `rtr_mgr` return an enum value, the function signature defines the return type as `int`. This is error-prone and reduces readability. To fix this, the `int` return data type has been replaced by the respective enum type.
Matthias BräuerTassilo TannebergerMatthias Bräuer
68160abc56fIgnore received PDUs of supported but disabled features- Previously, when a PDU of a supported but disabled feature has been received, a segmentation fault was caused for some of the PDUs due to missing NULL-checks. Now, those PDUs are ignored and not further processed. - Previously, a feature that has not been initialized would cause a segmentation fault when the RTRlib manager was stopped and freed. This has been fixed by adding the neces...
Matthias BräuerTassilo TannebergerMatthias Bräuer
4a6b787c7b1rtr: Add unit test for error truncating
Matthias BräuerTassilo TannebergerMatthias Bräuer
e875b17a3a4rtr: Truncate erroneous PDU in error PDU- If an error PDU exceeds the maximum size of 65.535 octets, the erroneous PDU is truncated
Matthias BräuerTassilo TannebergerMatthias Bräuer
d4dd59ede18rtr: Fix compile warning
Matthias BräuerTassilo TannebergerMatthias Bräuer
3ea7bc10751rtr: Fix unit tests
Matthias BräuerTassilo TannebergerMatthias Bräuer
fc925dc0733rtr: Respond with error if ASPA announcement PDU contains no providers- Draft `8210bis` version 21; Section 5.12. states that an ASPA announcement PDU must always contain at least one provider autonomous system number - If an announcement doesn't contain any provider autonomous system numbers an error `ASPA Provider List Error (9)` is sent to the cache server and the transport connection is closed
Matthias BräuerTassilo TannebergerMatthias Bräuer
a17017505efrtr: Respond with error if ASPA withdrawal PDU contains data- Draft `8210bis` version 21; Section 5.12. states that an ASPA withdrawal PDU must always be exactly 12 octets long and thus must not contain any `Provider Autonomous System Numbers` - Since no other error code is specified for that scenario, a `Corrupt Data (0)` error response is sent to the cache server
Matthias BräuerTassilo TannebergerMatthias Bräuer
bfe2bb7917ertr: Update format of ASPA PDU to `8210bis` Draft version 21This removes the `uint16_t provider_count` and the `uint8_t afi_flags` fields of `struct pdu_aspa`, changes the data type of `uint16_t zero` to `uint8_t`, and moves the `uint8_t flags` field to be directly after the `uint8_t type` field.
tannebergerTassilo Tannebergertanneberger
c17fafcbe9drtrlib: fix a bug inside the verification algorithm- adding srirams examples too our test suite
Johannes HuberTassilo TannebergerJohannes Huber
7b2fce4fd05cmake: fix build w/ cmake 4
tannebergerMatthias Wählischtanneberger
e8a9fa1d5cfdoxygen: update styling- add doxygen/assets folder for new css/html files - updating Doxygen.in to accompany new style files
tannebergerMatthias Wählischtanneberger
6319429306fdoxygen: updating the doxygen example- the example inside the doxygen folder still used the old api
BriasGitHubBrias
574cb640313Fix: Add missing memory allocation NULL-checks (#298)* transport: add missing NULL checks to memory allocation calls - Memory allocation by `lrtr_calloc` or `lrtr_malloc` could fail which led to undefined behavior / segmentation faults when dereferencing the result pointer while initializing an SSH or TCP socket. Now, the `tr_ssh_init` and `tr_tcp_init` functions prematurely return with an error code instead. - In addition, the `tr_ssh_ini...
BriasGitHubBrias
a64bc33c9fbtransport: fix bad copy-paste in `tr_ssh_init` (#299)- Checking the wrong pointer (`ssh_socket->config.client_privkey_path` instead of `ssh_socket->config.server_hostkey_path`) for `NULL` after copying the server host key path to the SSH socket struct could lead to undefined behavior or at least an unnecessary error if `ssh_socket->config.client_privkey_path` is set to `NULL`. This commit fixes the check so that the correct pointer is e...
tannebergerMatthias Wählischtanneberger
15cd4b53391rtrlib: fix missing includes- the debug macro needs a function defined inside the rtrlib/lib/log_private.h header which was not included.
tannebergerTassilo Tannebergertanneberger
295cb8e6896rtrlib: replace exponential up- and downscaling from aspa_array- updating README - up- and downscaling now uses an linear offset of 1000
tannebergerTassilo Tannebergertanneberger
13015574a3crtrlib: extra checks for when user didn't initialize some tables- added null ptr checks in pfx_validate, aspa_verify and spki_validate - added warnings if the user tries to validate objects where there is no table
tannebergerTassilo Tannebergertanneberger
f3aa4096a25rtrlib: optimizing aspa_array- using lrtr_realloc instead of malloc & memcpy - decreasing the capacity of the array when possible
tannebergerTassilo Tannebergertanneberger
b9c69dafebdrtrlib: apply proper formatting
tannebergerTassilo Tannebergertanneberger
8ebdfed0decrtrlib: reworking user interface adding rtr_mgr_setup_sockets function- adjusted tests and tools - added function rtr_mgr_setup_sockets with functionality that previously resided in rtr_mgr_init
revol-xutTassilo Tannebergerrevol-xut
727611a08bdrtrlib: incorperating suggestions from Fabian Holler- removing self-explanatory comments - renaming include guards of ASPA_ARRAY - removing double negation - moving pthread_unlock
revol-xutTassilo Tannebergerrevol-xut
7301f7bbafetools: update rtrclient to support aspa- update main cmake file Co-authored-by: mrzslz <moritz.schulz@proton.me> Co-authored-by: carl <115627588+carl-tud@users.noreply.github.com>
revol-xutTassilo Tannebergerrevol-xut
25e16f50911tests: add aspa tests- add tests for AS_PATH verification - add tests for `aspa_array` - add tests for aspa pdu parsing and `aspa_table` updating - add tests for live interaction with rtr cache servers Co-authored-by: mrzslz <moritz.schulz@proton.me> Co-authored-by: carl <115627588+carl-tud@users.noreply.github.com>
revol-xutTassilo Tannebergerrevol-xut
c3a6f37bf28rtrlib: add aspa to central management data structure- add aspa_table to rtr_mgr functions - fix typos and format Co-authored-by: mrzslz <moritz.schulz@proton.me> Co-authored-by: carl <115627588+carl-tud@users.noreply.github.com>
revol-xutTassilo Tannebergerrevol-xut
f74457afbeaaspa: add aspa data structures and verification algorithm- add `aspa_array`, an ordered dynamic array - add `aspa_table` for storing and managing aspa data - add aspa table update functions - add AS_PATH verification algorithm Co-authored-by: mrzslz <moritz.schulz@proton.me> Co-authored-by: carl <115627588+carl-tud@users.noreply.github.com>
revol-xutTassilo Tannebergerrevol-xut
fb3f8e440a1rtr: add support for aspa pdus- add support for rtrv2 including aspa pdus - move rtr pdus to separate header - refactor undo-update logic - add aspa in-place and swap-in update mechanism Co-authored-by: mrzslz <moritz.schulz@proton.me> Co-authored-by: carl <115627588+carl-tud@users.noreply.github.com>
maurimMatthias Wählischmaurim
e5aaf073d63[FIX] Building with strict aliasingMotivation - building with strict aliasing flags fails - used flags shown below ``` set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=3 -fdiagnostics-color=always -frecord-gcc-switches") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-clash-protection -march=native -O2 -pipe -U_FORTI...
maurimTassilo Tannebergermaurim
3e4f635a2f2[FIX] Bit selection error for trie buildingMotivation: - test cases for arm7 Ubuntu18.04 and ppc64le Ubuntu18.04 failed - pipeline results in fail after commit - minor improvements for uniform build up live_tests How: - trie building is based on address (binary-trie) - getting a single bit for IPv6 addresses has been error prone for bit_postion > 95 - unsure why other distributions did not fail => may be due to different en...
maurimTassilo Tannebergermaurim
5911d1507e4Updates public rpki-cache and fixes pipline issuesMotivation - get pipeline checks running How: - insert valid rpki-cache which runs also rtr - edit url in live_tests, README - modify changelog date in librtr.spec file => no changelog results in error, because all changes older than 2years are dismissed - add more output on failure for tests
Nils BarsGitHubNils Bars
c7d58ab5181Bugfix: Use the actual struct size and not the pointer size (#288)
maurimMatthias Wählischmaurim
52b2d660496Updates the used public rpki-caches for testing environmentMotivation - get pipeline checks running How: - find valid rpki-cache which runs also rtr - edit url in live_tests
Zopolis4Marcel RöthkeZopolis4
e3f6bf625bflib: Restrict overmatching MACH ifdef to only trigger on OSX and Mach
Olivier Cochard-LabbéMarcel RöthkeOlivier Cochard-Labbé
1a2a042ca65Fix LIBSSH_ variable names
Marcel RöthkeMatthias WaehlischMarcel Röthke
41f5f057d47rtr_mgr: replace mutex with rwlockrtr_mgr could enter a deadlocked state with multiple socket groups when a group with at least one group of lower preference comes back online. This happens because the thread of the group coming back online blocks on trying to shut down all threads with lower preference while holding the rtr_mgrs mutex, but a thread that tries to acquire that same mutex cannot be shut down while doing so. Sinc...
Martin WinterMarcel RöthkeMartin Winter
d80baaf0cffredhat: Fix RPM file to work on Fedora 33+ and RedHat 9+- Newer Fedora/RedHat changes cmake rpm build to build out of tree and requires the use of macros for correct locations See https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds - On newer Fedora, the SOURCES subdirectory isn't created automatically and needs to be created in the prep phase before the tar is created Signed-off-by: Martin Winter <mwinter@opensourcerout...
Marcel RöthkeGitHubMarcel Röthke
179e7efb595rtrlib/rtr_mgr: properly cleanup rtr_sockets on stop (#268)Previously rtr_sockets could not be restarted because their state remained on SHUTDOWN, which they can, by design, not recover from themselves.
Colin SamesMarcel RöthkeColin Sames
474ea3814afbgpsec: CONFIG_H -> RTR_CONFIG_H