]> git.ipfire.org Git - thirdparty/FORT-validator.git/log
thirdparty/FORT-validator.git
6 years agoSupport RTRv1, validate version on PDU exchanges
pcarana [Sat, 20 Jul 2019 00:45:34 +0000 (19:45 -0500)] 
Support RTRv1, validate version on PDU exchanges

6 years agoStore BGPsec certs info, print at configured output
pcarana [Fri, 19 Jul 2019 17:04:26 +0000 (12:04 -0500)] 
Store BGPsec certs info, print at configured output

-Use struct 'router_key' to represent BGPsec certificates.
-Use reference count of Subject Key data (ID and public key) with 'sk_info' struct.
-Add router certificates info to local DB, as part of the refactor 'roa_table' was renamed to 'db_table'.
-Add configuration parameter 'output.bgpsec', the information is printed in hexadecimal representation (there's a TODO here: maybe encode and print as base64).
-Consider BGPsec keys in deltas.
-Use a constant for SKI length, since always is the same (20 bytes/octets).

6 years agoDon't retry MFT download when EE is revoked (related to #11)
pcarana [Wed, 17 Jul 2019 23:13:28 +0000 (18:13 -0500)] 
Don't retry MFT download when EE is revoked (related to #11)

6 years agoFix #12: this isn't a critical error (isn't dev's fault)
pcarana [Wed, 17 Jul 2019 18:16:29 +0000 (13:16 -0500)] 
Fix #12: this isn't a critical error (isn't dev's fault)

6 years agoFix 11: validate certificates against its corresponding CRL.
pcarana [Wed, 17 Jul 2019 17:04:17 +0000 (12:04 -0500)] 
Fix 11: validate certificates against its corresponding CRL.

The OpenSSL function 'X509_STORE_CTX_set0_crls' wasn't taking into consideration the CRL stack; the simple way to check revocation was doing it manually.
Pay special attention to manifests, the CRL stack that's received when its EE is validated, is grandparent's CRL; so, in this case, validate manifests on its own CRLDP.

6 years agoRead and validate BGPsec router certificates
pcarana [Wed, 10 Jul 2019 22:48:31 +0000 (17:48 -0500)] 
Read and validate BGPsec router certificates

-Prepare structs and functions to send RTRv1 router key PDUs.
-Basic preparation to store router keys, still needs more work.
-Validate BGPsec certificates based on RFCs 8209 and 8608.
-Configure RTRv1 intervals (refresh, retry, expire), more validations and logic are pending.
-Update sorted array to allow iterations on its elements.

6 years agoUnify _layouts code. Adjust default layout design, add index menu to documentation.
Gerardo Pias [Tue, 9 Jul 2019 03:13:52 +0000 (00:13 -0300)] 
Unify _layouts code. Adjust default layout design, add index menu to documentation.
Unify css style sheets. Improve documentation style.

6 years agoRollback commit 9f07ee2 since this isn't a bug
pcarana [Thu, 4 Jul 2019 18:56:36 +0000 (13:56 -0500)] 
Rollback commit 9f07ee2 since this isn't a bug

6 years agoFix bug: ROAs ASN wasn't validated against the allowed advertising
pcarana [Wed, 3 Jul 2019 20:19:27 +0000 (15:19 -0500)] 
Fix bug: ROAs ASN wasn't validated against the allowed advertising

6 years agoAdd some small fixes.
pcarana [Tue, 2 Jul 2019 20:12:02 +0000 (15:12 -0500)] 
Add some small fixes.

-Update '--tal' and '--slurm' arguments doc.
-Update '-O' level to '2'.
-Remove unnecessary parameter '*serial' on 'vrps_foreach_base_roa'.

6 years agoDon't store downloaded URI when forcing rsync and log rsync'd URI
pcarana [Tue, 2 Jul 2019 19:44:38 +0000 (14:44 -0500)] 
Don't store downloaded URI when forcing rsync and log rsync'd URI

6 years agoAdd ROA eContent to debug, and parse asID just once
pcarana [Mon, 1 Jul 2019 21:46:23 +0000 (16:46 -0500)] 
Add ROA eContent to debug, and parse asID just once

6 years agoRetry rsync when a MFT has errors to avoid 'transient inconsistency'
pcarana [Mon, 1 Jul 2019 19:23:25 +0000 (14:23 -0500)] 
Retry rsync when a MFT has errors to avoid 'transient inconsistency'

6 years agoDetach clients threads after the connection is closed
pcarana [Fri, 28 Jun 2019 16:22:03 +0000 (11:22 -0500)] 
Detach clients threads after the connection is closed

6 years agoImprove the patch from the previous commit
Alberto Leiva Popper [Thu, 27 Jun 2019 20:27:59 +0000 (15:27 -0500)] 
Improve the patch from the previous commit

The solution was prone to revalidations, which (aside from slowing
things down a bit) yielded annoying duplicate validation error messages.

6 years agoPatch bad initialization of CRL stack
Alberto Leiva Popper [Thu, 27 Jun 2019 17:45:29 +0000 (12:45 -0500)] 
Patch bad initialization of CRL stack

6 years agoUpdate installation steps, patch OpenBSD compilation again v0.0.2
Alberto Leiva Popper [Fri, 14 Jun 2019 23:09:20 +0000 (18:09 -0500)] 
Update installation steps, patch OpenBSD compilation again

6 years agoReplace 'server.disabled' by 'mode' (server or standalone)
pcarana [Fri, 14 Jun 2019 23:07:49 +0000 (18:07 -0500)] 
Replace 'server.disabled' by 'mode' (server or standalone)

6 years agoRemove the libcmscodec dependency
Alberto Leiva Popper [Fri, 14 Jun 2019 17:47:26 +0000 (12:47 -0500)] 
Remove the libcmscodec dependency

libcmscodec's generated code is now git tracked by this repository. This
prevents lots of autotools and Debian package headaches, as well as
allowing us to prune large chunks of steps from the installation
recipes.

One of the reasons why we had the previous arrangement was because we
used to consider asn1c's output generated code, which meant we weren't
supposed to track it. However, the fact of the matter is that we'll
eventually need to tweak it manually, because we need to implement DER
parsing and better error message reporting, as well as improve the
quality of asn1c's code.

6 years agoFix warnings at man, fix bug: rsync wasn't executed on each validation
pcarana [Thu, 13 Jun 2019 20:49:05 +0000 (15:49 -0500)] 
Fix warnings at man, fix bug: rsync wasn't executed on each validation

6 years agoPatch lintian warnings, tweak documentation
Alberto Leiva Popper [Thu, 13 Jun 2019 17:42:22 +0000 (12:42 -0500)] 
Patch lintian warnings, tweak documentation

6 years agoUse flag ENABLE_STRICT_STRATEGY to allow strict sync strategy
pcarana [Wed, 12 Jun 2019 23:59:36 +0000 (18:59 -0500)] 
Use flag ENABLE_STRICT_STRATEGY to allow strict sync strategy

6 years agoFix #7, use --dirs by default and update 'strict' mode behavior.
pcarana [Wed, 12 Jun 2019 22:23:31 +0000 (17:23 -0500)] 
Fix #7, use --dirs by default and update 'strict' mode behavior.

If the mode is 'strict', download rsync URI if it hasn't been explicitly visited before.

6 years agoMerge branch 'systemd'
Alberto Leiva Popper [Tue, 11 Jun 2019 23:58:48 +0000 (18:58 -0500)] 
Merge branch 'systemd'

6 years agoAdd more installation options
Alberto Leiva Popper [Tue, 11 Jun 2019 23:07:03 +0000 (18:07 -0500)] 
Add more installation options

6 years agoUpdate manual, unit tests, and add some fixes.
pcarana [Tue, 11 Jun 2019 23:08:45 +0000 (18:08 -0500)] 
Update manual, unit tests, and add some fixes.

- Uncomment some unit tests and update them.
- Rename server.enabled flag to server.disabled, and update the flows affected by this update.
- Update version references to 0.0.1-beta.
- Update manual (man).
- Include automake as a Debian dependency.
- Validate PDU length received vs real bytes length received.
- Don't die if the PDU reader gets less bytes than what's expected.
- Remove 'crl_set' from rpp.c since the 'crl' is a pointer (the flag isn't necessary).
- Don't set SLURM comments as 'char const *', just as 'char *'.
- Print the ROAs to 'output.roa' after SLURM has been applied, or even when an error stopped validation (only the ROAs fetched to that point are printed).

6 years agoFix bug: segfault when no CRL was set
pcarana [Mon, 10 Jun 2019 21:26:55 +0000 (16:26 -0500)] 
Fix bug: segfault when no CRL was set

6 years agoPatch build bugs found while Debian-packaging
Alberto Leiva Popper [Thu, 6 Jun 2019 15:45:12 +0000 (10:45 -0500)] 
Patch build bugs found while Debian-packaging

The most important ones were

- Patch `make distclean`.
  test/'s distclean was attempting to clean stuff that src/'s
  distclean had already removed, so it was aborting.
  Fixed by moving needed .c's from test/Makefile.am to each
  test .c file.
  This prevents the unit tests from polluting src/.
- Simplify inclusion of unit tests during configure.
  Rather than purposedly include them with --with-unit-tests,
  they are now automatically included if Check is installed.
  This also removes a lot of clutter from configure.ac.

6 years agoAdd server.enabled and output.roa arguments, update server.address docs
pcarana [Wed, 5 Jun 2019 17:00:11 +0000 (12:00 -0500)] 
Add server.enabled and output.roa arguments, update server.address docs

Now to perform a standalone validation, the server must be disabled (server.enabled = false).
The ROAs in CSV format can be: printed to console (output.roa = '-'), printed to a file (output.roa = '<file>'), not printed (output.roa isn't configured).
'server.address' docs specify the scenario when no value is set to that argument.

6 years agoMerge branch 'iterative'
Alberto Leiva Popper [Tue, 4 Jun 2019 16:22:31 +0000 (11:22 -0500)] 
Merge branch 'iterative'

6 years agoMake pr_crit() non-returnable
Alberto Leiva Popper [Tue, 4 Jun 2019 16:09:47 +0000 (11:09 -0500)] 
Make pr_crit() non-returnable

Code was trying to recover from critical/programming errors, but
most of the time they were being handled the same as validation
errors. This yielded often nonsensical results.

Critical errors now terminate the program. This is obviously
undesired, but is probably safer than doing something close to
undefined.

6 years agoUpdate unit tests
Alberto Leiva Popper [Mon, 3 Jun 2019 22:44:58 +0000 (17:44 -0500)] 
Update unit tests

6 years agoRemove the reset and merge validation handler callbacks
Alberto Leiva Popper [Mon, 3 Jun 2019 21:50:31 +0000 (16:50 -0500)] 
Remove the reset and merge validation handler callbacks

The only certificate that can invalidate the tree is the root one.
This is because other certificates are considered subtrees, and
therefore isolated problems.

RFC 7730 seems to agree:

> If the connection to the preferred URI fails, or the retrieved CA
> certificate public key does not match the TAL public key, the RP
> SHOULD retrieve the CA certificate from the next URI

(Neither of those reasons can be caused by a subtree.)

By the time the first ROA is handled, the root certificate is
already validated. This means that Fort will never find itself
needing to invalidate previously handled ROAs. Hence, there's no
need to "reset" a ROA table nor "merge" it with a global one after
success.

Not having to track both a global and a temporal table also reduces
RAM usage.

6 years agoReplace recursive tree traversal with iterative one
Alberto Leiva Popper [Thu, 30 May 2019 22:16:34 +0000 (17:16 -0500)] 
Replace recursive tree traversal with iterative one

Prevents stack overflows on tall RPKI trees.

6 years agoRelocate VRPs override function, and complete unit tests.
pcarana [Sat, 1 Jun 2019 01:01:09 +0000 (20:01 -0500)] 
Relocate VRPs override function, and complete unit tests.

- The function that checks and removes VRPs that override eachother (before being sent by RTR), has been placed where VRPs functions are located.
- Fix the impersonator function that returns the minimum client serial.
- Add unit test to:
+   Check that deltas that won't be sent or used anymore, will be forgotten.
+   Check that a range of deltas that'll be sent by RTR, don't contain VRP announcements/withdrawals that override eachother.
+   Chech that a PDU with a wrong session ID is correctly handled.

6 years agoUpdate references to libcmscodec beta2
pcarana [Fri, 31 May 2019 16:34:04 +0000 (11:34 -0500)] 
Update references to libcmscodec beta2

6 years agoLog decoding errors only when requested
pcarana [Wed, 29 May 2019 20:11:05 +0000 (15:11 -0500)] 
Log decoding errors only when requested

6 years agoAdd CMS compatibility with PKCS #7 and fix debug log bug
pcarana [Wed, 29 May 2019 17:38:14 +0000 (12:38 -0500)] 
Add CMS compatibility with PKCS #7 and fix debug log bug

6 years agoAdd minor style change.
Gerardo Pias [Wed, 29 May 2019 13:33:26 +0000 (10:33 -0300)] 
Add minor style change.

6 years agoAdd minor style change to improve legibility.
Gerardo Pias [Tue, 28 May 2019 22:26:58 +0000 (19:26 -0300)] 
Add minor style change to improve legibility.

6 years agoAdd style adjustment to improve legibility.
Gerardo Pias [Tue, 28 May 2019 19:11:01 +0000 (16:11 -0300)] 
Add style adjustment to improve legibility.

6 years agoAdd styles and design following the guidelines for the FORT project.
Gerardo Pias [Mon, 27 May 2019 18:02:33 +0000 (15:02 -0300)] 
Add styles and design following the guidelines for the FORT project.

6 years agoFurther documentation proofreading
Alberto Leiva Popper [Mon, 27 May 2019 23:26:30 +0000 (18:26 -0500)] 
Further documentation proofreading

6 years agoRevert "Remove the incidence framework"
Alberto Leiva Popper [Mon, 27 May 2019 21:47:59 +0000 (16:47 -0500)] 
Revert "Remove the incidence framework"

This reverts most of commit
c719f7a79ea307b609be0747d1a080b3452917d7.

¯\_(ツ)_/¯

Removes old incidences, adds "Signed Object's hash algorithm has
NULL object as parameters" incidence.

6 years agoRemove the incidence framework
Alberto Leiva Popper [Thu, 23 May 2019 20:56:00 +0000 (15:56 -0500)] 
Remove the incidence framework

The two incidences I had planned to include have been resolved as
"wontfix," basically:

1. A re-read of RFC 3370 has revealed that whether the parameters
   field is supposed to be absent or NULL is completely ambiguous,
   so we'll accept both now.
2. As for rsaEncryption vs sha256WithRSAEncryption for public keys,
   the relevant sidr mailing list thread is currently favoring the
   former. And the vast majority of the global RPKI does the same,
   so there's no error to silence.

6 years agoAdd slurm and incidences to the documentation
Alberto Leiva Popper [Tue, 21 May 2019 22:29:08 +0000 (17:29 -0500)] 
Add slurm and incidences to the documentation

6 years agoReturn server.validation-interval min value to 60 (my bad)
pcarana [Tue, 21 May 2019 21:18:14 +0000 (16:18 -0500)] 
Return server.validation-interval min value to 60 (my bad)

6 years agoAdd multiple improvements at SLURM, config and vrp, and fix a test bug
pcarana [Tue, 21 May 2019 21:11:40 +0000 (16:11 -0500)] 
Add multiple improvements at SLURM, config and vrp, and fix a test bug

- Fix bug at client_test, the module wasn't updated with several changes from other commits.
- Add common function to load data from a file or directory, use this for TAL and SLURM locations (both configurations can have a file path or a dir path).
- Update some config parameters:
+   'server.slurm.location' renamed to 'slurm' and it can be a file path or a directory path.
+   'server.queue' renamed to 'server.backlog' with a default value of SOMAXCONN.
+   Delete 'server.rtr-interval.*' (RTRv1 isn't supported yet).
- Create macros to compare VRPs and to compare each of its properties.
- If the SLURM has errors, don't drop the whole ROA tree, just don't apply SLURM on the tree.

6 years agoPatch documentation URL
Alberto Leiva Popper [Tue, 21 May 2019 00:24:50 +0000 (19:24 -0500)] 
Patch documentation URL

Was breaking the images.

6 years agoUpdate a good chunk of the documentation
Alberto Leiva Popper [Tue, 21 May 2019 00:09:26 +0000 (19:09 -0500)] 
Update a good chunk of the documentation

6 years agoAttend some TODOs on clients and vrps DB
pcarana [Mon, 20 May 2019 22:06:50 +0000 (17:06 -0500)] 
Attend some TODOs on clients and vrps DB

+Clients:
- Unify thread's DB and clients DB; threads IDs are remembered apart from client FDs, so that the main process can join all threads at the end.
- Remove (now unnecessary) struct rtr_client.
- End clients gracefully when the server is stopped (release memory, close sockets, join threads) and when communication between server-client stops in a regular way (eg. all PDUs were sent and the communication is terminated).
- Add a client to the DB until its own thread has started.
- Init clients DB from rtr.c instead of main.c.

+VRPS:
- Remove min_serial storage, is useless; calculate it instead when requested.
- Purge deltas when needed and don't store them if there are no clients.
- Rename 'current_serial' to 'next_serial'.

6 years agoMiscellaneous patches
Alberto Leiva Popper [Mon, 20 May 2019 15:46:44 +0000 (10:46 -0500)] 
Miscellaneous patches

- include most TALs for convenience
- patch local repository's `mkdir -p` (just wasn't working at all)
- print status messages on client `accept(2)` failures

6 years agoPatch compilation on OpenBSD and LibreSSL
Alberto Leiva Popper [Fri, 17 May 2019 21:06:55 +0000 (16:06 -0500)] 
Patch compilation on OpenBSD and LibreSSL

6 years agoFix atomic reference counter TODO
Alberto Leiva Popper [Thu, 16 May 2019 18:40:45 +0000 (13:40 -0500)] 
Fix atomic reference counter TODO

I couldn't find a viable way to multithreadedly manage deltas
without reference counters, and sig_atomic_t doesn't look portable
to me. So I decided to use C11 atomic types.

Upgrades the language standard from gnu99 to gnu11.

6 years agoAnother review
Alberto Leiva Popper [Wed, 15 May 2019 20:57:09 +0000 (15:57 -0500)] 
Another review

- Remove the traverse_down() and traverse_up() callbacks, obsolete since
  the ROA database refactor.
- Fix warnings reported by ultra-pedantic gcc.
- Add abbreviations file.
- Patch unit tests (broken in the last commit).
- Some TODOs patched or discarded.

6 years agoAdd incidence framework
Alberto Leiva Popper [Tue, 14 May 2019 23:02:15 +0000 (18:02 -0500)] 
Add incidence framework

It's a configurable means to define the outcome of a validation
error.
At present, it has only been coded to handle the signature
algorithm having parameters error, since it's technically a
profile violation, and yet there's an insurmountable amount of
certificates breaking it at present.

Unrelatedly, the commit also prevents some RTR errors from being
responded to RTR errors.

6 years agoMerge remote-tracking branch 'origin/slurm-use' into cleanup
pcarana [Tue, 14 May 2019 20:27:13 +0000 (15:27 -0500)] 
Merge remote-tracking branch 'origin/slurm-use' into cleanup

6 years agoSecond iteration of the client responses review
Alberto Leiva Popper [Mon, 13 May 2019 13:55:32 +0000 (08:55 -0500)] 
Second iteration of the client responses review

6 years agoRemove TODO: don't panic when uthash can't allocate memory
pcarana [Sat, 11 May 2019 00:41:05 +0000 (19:41 -0500)] 
Remove TODO: don't panic when uthash can't allocate memory

6 years agoReview, mostly on error responses to the client
Alberto Leiva Popper [Fri, 10 May 2019 23:26:49 +0000 (18:26 -0500)] 
Review, mostly on error responses to the client

- Add several validations
- Some error pipelines were missing error responses
- Patch "Erroneous PDU" fields. (The server was writing only headers,
  not as much of the offending PDU as possible.)

6 years agoSimplify PDUs sender.
pcarana [Fri, 10 May 2019 22:44:20 +0000 (17:44 -0500)] 
Simplify PDUs sender.

-Remove data_buffer struct since isn't really needed.
-Move BUFFER_SIZE (now MAX_BUFFER_SIZE) to pdu_serializer, and increment to 1024.
-The static sender function (send_response) just sends whatever data it receives, since every other PDU sender function and the serializer are responsible to set the data length to the exact size of the data that'll be sent.

6 years agoRemove some TODOs and re-classify others
pcarana [Fri, 10 May 2019 18:06:58 +0000 (13:06 -0500)] 
Remove some TODOs and re-classify others

-Move directory loading and file filtering to common.h.
-Accept a TALs directory in configuration.
-Don't check for overriden PDUs if there's only 1 delta to send.
-Add roa_table merge function, this allows to merge distinct roa tables so that the VRPs base can have all the data from multiple TALs.
-Remove 'loop' var (isn't necessary) and make 'sigaction act' a global var.

6 years agoPatch the PDU handler's locking
Alberto Leiva Popper [Thu, 9 May 2019 19:55:48 +0000 (14:55 -0500)] 
Patch the PDU handler's locking

Side effects:

- New typedef: `serial_t`. Because I keep forgetting the serial data
  type we're using.
- Remove `enum delta_op` in favor of `FLAG_*`. The latter still should
  probably be converted into an enum and renamed though, especially
  since its instances are never actually used as bitwise flags.
- Moved `struct vrp`'s `flag` field into `struct delta`, because it's
  not always used in `vrp`.

Also, to improve performance a little, we're no longer canceling deltas
on cache responses when there's only one serial, because the ROA hash
table already guarantees their uniqueness.

6 years agoRelocate and rename some functions
pcarana [Tue, 7 May 2019 16:22:31 +0000 (11:22 -0500)] 
Relocate and rename some functions

6 years agoApply SLURM prefixes before calculating the deltas
pcarana [Tue, 7 May 2019 14:47:56 +0000 (09:47 -0500)] 
Apply SLURM prefixes before calculating the deltas

6 years agoMove slurm code to its own directory
pcarana [Mon, 6 May 2019 16:56:39 +0000 (11:56 -0500)] 
Move slurm code to its own directory

6 years agoFix some issues pointed by ydahhrk (thanks BTW) at commits ee3366d and 59f2376
pcarana [Fri, 3 May 2019 22:51:04 +0000 (17:51 -0500)] 
Fix some issues pointed by ydahhrk (thanks BTW) at commits ee3366d and 59f2376

6 years agoFix memory leak
pcarana [Fri, 3 May 2019 21:24:26 +0000 (16:24 -0500)] 
Fix memory leak

6 years agoMerge remote-tracking branch 'origin/cleanup' into roa-hashtable
pcarana [Fri, 3 May 2019 21:14:40 +0000 (16:14 -0500)] 
Merge remote-tracking branch 'origin/cleanup' into roa-hashtable

6 years agoAnother batch of memory management polish.
Alberto Leiva Popper [Fri, 3 May 2019 18:31:23 +0000 (13:31 -0500)] 
Another batch of memory management polish.

6 years agoForget unnecessary deltas
pcarana [Fri, 3 May 2019 18:03:40 +0000 (13:03 -0500)] 
Forget unnecessary deltas

6 years agoPatch several memory leaks
Alberto Leiva Popper [Thu, 2 May 2019 23:14:20 +0000 (18:14 -0500)] 
Patch several memory leaks

6 years agoAvoid to send deltas with pdus that override each other
pcarana [Thu, 2 May 2019 20:14:35 +0000 (15:14 -0500)] 
Avoid to send deltas with pdus that override each other

6 years agoFix deltas update and fetch (serial wasn't correctly used)
pcarana [Thu, 2 May 2019 20:10:47 +0000 (15:10 -0500)] 
Fix deltas update and fetch (serial wasn't correctly used)

6 years agoBits of random cleanup
Alberto Leiva Popper [Thu, 2 May 2019 17:45:27 +0000 (12:45 -0500)] 
Bits of random cleanup

6 years agoChange the ROA table from a tree to a hash table
Alberto Leiva Popper [Tue, 30 Apr 2019 19:56:38 +0000 (14:56 -0500)] 
Change the ROA table from a tree to a hash table

Previously, I had missed this requirement:

The cache server MUST ensure that it has told the router client to
have one and only one IPvX PDU for a unique {Prefix, Len, Max-Len,
ASN} at any one point in time.  Should the router client receive an
IPvX PDU with a {Prefix, Len, Max-Len, ASN} identical to one it
already has active, it SHOULD raise a Duplicate Announcement Received
error.

It literally changes everything.

6 years agoMerge branch 'cleanup' into validator-rtr-fusion
Alberto Leiva Popper [Tue, 30 Apr 2019 16:23:48 +0000 (11:23 -0500)] 
Merge branch 'cleanup' into validator-rtr-fusion

6 years agoCatch lock errors
Alberto Leiva Popper [Tue, 30 Apr 2019 15:07:49 +0000 (10:07 -0500)] 
Catch lock errors

Though sometimes we can't do anything meaningful with the errors,
but panicking is probably better than ignoring them and subtly
doing the wrong thing.

6 years agoUse log.h functions, replace some u_int* vars, and fix a few headers
pcarana [Tue, 30 Apr 2019 15:04:05 +0000 (10:04 -0500)] 
Use log.h functions, replace some u_int* vars, and fix a few headers

6 years agoFix some issues while the ROA tree is created
pcarana [Fri, 26 Apr 2019 21:59:15 +0000 (16:59 -0500)] 
Fix some issues while the ROA tree is created

6 years agoFix and optimize the client module
Alberto Leiva Popper [Thu, 25 Apr 2019 19:26:57 +0000 (14:26 -0500)] 
Fix and optimize the client module

The code was underperforming on lookups (which also meant it
was underperforming on adds and removals), and had incorrect
locking.

Also, adds and removes had inconsistent keys (adds used addresses
and removes used file descriptors). This wasn't necessarily
a bug, but added needless complexity.

6 years agoMerge remote-tracking branch 'rtrserver/master'
pcarana [Tue, 23 Apr 2019 23:27:35 +0000 (18:27 -0500)] 
Merge remote-tracking branch 'rtrserver/master'

Include SLURM functions and some adequations to run the validator.

6 years agoRandom TODO patching
Alberto Leiva Popper [Tue, 23 Apr 2019 21:57:04 +0000 (16:57 -0500)] 
Random TODO patching

6 years agoOptimize the ROA code
Alberto Leiva Popper [Wed, 10 Apr 2019 21:58:11 +0000 (16:58 -0500)] 
Optimize the ROA code

Changed a bunch of arraylists into a tree. Helps with substantially
reducing comparisons needed to compute deltas.

6 years agoAllow ASN 0 at CSV parsing
pcarana [Tue, 16 Apr 2019 23:09:31 +0000 (18:09 -0500)] 
Allow ASN 0 at CSV parsing

6 years agoRename 'is_new' funcs, use ENOENT err at SLURM loading, allow ASN 0
pcarana [Tue, 16 Apr 2019 22:38:23 +0000 (17:38 -0500)] 
Rename 'is_new' funcs, use ENOENT err at SLURM loading, allow ASN 0

6 years agoReturn error on unknown members (RFC8416 3.1)
pcarana [Tue, 16 Apr 2019 15:13:43 +0000 (10:13 -0500)] 
Return error on unknown members (RFC8416 3.1)

6 years agoComplete SLURM validations and avoid memleaks
pcarana [Mon, 15 Apr 2019 21:53:15 +0000 (16:53 -0500)] 
Complete SLURM validations and avoid memleaks

6 years agoStore SLURM data in memory, add doc to base64url_decode
pcarana [Sat, 13 Apr 2019 00:10:36 +0000 (19:10 -0500)] 
Store SLURM data in memory, add doc to base64url_decode

6 years agoUpdate SLURM loading:
pcarana [Thu, 11 Apr 2019 20:26:48 +0000 (15:26 -0500)] 
Update SLURM loading:

-Remove slurm_check_interval configuration parameter since is unnecessary.
-Load multiple SLURM files from a configured location (must be a directory).

6 years agoDelete slurm dir and relocate its content
pcarana [Thu, 11 Apr 2019 14:53:10 +0000 (09:53 -0500)] 
Delete slurm dir and relocate its content

6 years agoAdd multiple changes at PDU and buffers:
pcarana [Wed, 10 Apr 2019 22:16:41 +0000 (17:16 -0500)] 
Add multiple changes at PDU and buffers:

-Add Router Key PDU (structs, serializer, sender function with pending work to do).
-Set buffers as unsigned char buffers.
-Prepare to send large PDUs (beta).
-Increment default buffer size to 512.

6 years agoValidate that SKI is 20 octets long
pcarana [Tue, 9 Apr 2019 21:26:17 +0000 (16:26 -0500)] 
Validate that SKI is 20 octets long

6 years agoRelocate some code, and add decoded strings length
pcarana [Tue, 9 Apr 2019 20:20:55 +0000 (15:20 -0500)] 
Relocate some code, and add decoded strings length

6 years agoComplete bgpsec parsing (decode base64 using crypto functions)
pcarana [Tue, 9 Apr 2019 17:06:26 +0000 (12:06 -0500)] 
Complete bgpsec parsing (decode base64 using crypto functions)

6 years agoPurge nonstandard data types `u_intXX_t`
Alberto Leiva Popper [Mon, 8 Apr 2019 19:49:38 +0000 (14:49 -0500)] 
Purge nonstandard data types `u_intXX_t`

6 years agoMerge remote-tracking branch 'rtrserver/master'
Alberto Leiva Popper [Thu, 4 Apr 2019 18:45:23 +0000 (12:45 -0600)] 
Merge remote-tracking branch 'rtrserver/master'

Checkpoint: console validation is stable, server is not.

6 years agoLoad and start parsing SLURM file (prefixes for now)
pcarana [Thu, 4 Apr 2019 18:13:22 +0000 (12:13 -0600)] 
Load and start parsing SLURM file (prefixes for now)

6 years agoHandle SIGINT signal to terminate client threads
pcarana [Tue, 2 Apr 2019 20:55:32 +0000 (14:55 -0600)] 
Handle SIGINT signal to terminate client threads

6 years agoAdd compilation warnings, and rename VRP struct property
pcarana [Tue, 2 Apr 2019 20:54:17 +0000 (14:54 -0600)] 
Add compilation warnings, and rename VRP struct property