]> git.ipfire.org Git - thirdparty/FORT-validator.git/log
thirdparty/FORT-validator.git
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

6 years agoDon't consider AS 0 as a valid ASN
pcarana [Mon, 1 Apr 2019 23:47:12 +0000 (17:47 -0600)] 
Don't consider AS 0 as a valid ASN

6 years agoAdd RTR server configuration docs
pcarana [Mon, 1 Apr 2019 22:27:38 +0000 (16:27 -0600)] 
Add RTR server configuration docs

6 years agoUpdate README
pcarana [Mon, 1 Apr 2019 22:26:48 +0000 (16:26 -0600)] 
Update README

6 years agoAdd some fixes (errors, mem leak, error report PDU)
pcarana [Fri, 29 Mar 2019 21:38:36 +0000 (15:38 -0600)] 
Add some fixes (errors, mem leak, error report PDU)

-Return errors as negative
-Fix mem leak at clients.c
-Send received PDU header at error PDU when client session ID doesn't match server's session ID

6 years agoRemove clients on communication errors
pcarana [Fri, 29 Mar 2019 19:51:06 +0000 (13:51 -0600)] 
Remove clients on communication errors

6 years agoAdd read/write semaphores at deltas DB
pcarana [Fri, 29 Mar 2019 18:34:39 +0000 (12:34 -0600)] 
Add read/write semaphores at deltas DB

6 years agoUse semaphores at clients DB, create common read lock funcs
pcarana [Thu, 28 Mar 2019 23:31:25 +0000 (17:31 -0600)] 
Use semaphores at clients DB, create common read lock funcs

6 years agoUpdate baseurl to 'FORT-validator'
pcarana [Thu, 28 Mar 2019 16:16:03 +0000 (10:16 -0600)] 
Update baseurl to 'FORT-validator'

6 years agoFix bug: the summary was sending wrong data due to bad mem copy
pcarana [Wed, 27 Mar 2019 23:37:54 +0000 (17:37 -0600)] 
Fix bug: the summary was sending wrong data due to bad mem copy

6 years agoDon't rely on in6_addr.s6_addr32, serialize IPv6 byte by byte
pcarana [Wed, 27 Mar 2019 21:34:03 +0000 (15:34 -0600)] 
Don't rely on in6_addr.s6_addr32, serialize IPv6 byte by byte

6 years agoRemove some memleaks reported by Valgrind
pcarana [Wed, 27 Mar 2019 17:41:34 +0000 (11:41 -0600)] 
Remove some memleaks reported by Valgrind

-Make threads joinable and implement a destroy function used by the main thread (here all the threads are joined).
-Start the updates_daemon until the server socket is correctly binded.
-Valgrind reports some leaks on abnormal termination, so these will be handled later.

6 years agoReturn success when the VRPs location doesn't exists (useful for cron)
pcarana [Mon, 25 Mar 2019 23:10:06 +0000 (17:10 -0600)] 
Return success when the VRPs location doesn't exists (useful for cron)

6 years agoUpdate the READMEs
Alberto Leiva Popper [Mon, 25 Mar 2019 22:58:10 +0000 (16:58 -0600)] 
Update the READMEs

6 years agoAdd instructions to run
Alberto Leiva Popper [Mon, 25 Mar 2019 21:08:12 +0000 (15:08 -0600)] 
Add instructions to run

6 years agoAdd documentation draft
Alberto Leiva Popper [Mon, 25 Mar 2019 07:55:44 +0000 (01:55 -0600)] 
Add documentation draft

6 years agoPatch TOML parsing quirks found while documenting
Alberto Leiva Popper [Sun, 24 Mar 2019 23:34:04 +0000 (17:34 -0600)] 
Patch TOML parsing quirks found while documenting

- Was complaining about missing optional fields
- Was freeing fields using the wrong function

6 years agoPatch Valgrind's "still reachable" memory leak
Alberto Leiva Popper [Sat, 23 Mar 2019 01:26:33 +0000 (19:26 -0600)] 
Patch Valgrind's "still reachable" memory leak

The thread variable destructor is not being called on normal
program termination. Not sure why. Maybe it's only meant for
thread interruption.

It was easily fixed with a normal destructor.

6 years agoAvoid some memory leaks
pcarana [Fri, 22 Mar 2019 23:27:00 +0000 (17:27 -0600)] 
Avoid some memory leaks

6 years agoRedo #4.
Alberto Leiva Popper [Fri, 22 Mar 2019 19:59:16 +0000 (13:59 -0600)] 
Redo #4.

After discussing it further still, we decided to add another
synchronization strategy, which behaves as requested in the issue.

The new strategy is `root-except-ta`. As its name implies, it
behaves as `root` mode, except for the root certificate, which is
synchronized in `strict` mode.

This way we get the best of both worlds: If the root certificate
is known to reside in the same repository as everything else, the
user can choose `root` and synchronize as fast as possible.
On the other hand, if the user does not want to download the entire
repository until the root certificate has been validated, they can
choose `root-except-ta`.

6 years agoUse warn(x) to log, don't start server without conf file
pcarana [Fri, 22 Mar 2019 18:07:04 +0000 (12:07 -0600)] 
Use warn(x) to log, don't start server without conf file

6 years agoSeparate recursive from non-recursive RSYNCs
Alberto Leiva Popper [Fri, 22 Mar 2019 17:50:36 +0000 (11:50 -0600)] 
Separate recursive from non-recursive RSYNCs

Wraps up #4 properly.

6 years agoRemove some TODOs and add some fixes.
pcarana [Fri, 22 Mar 2019 16:08:42 +0000 (10:08 -0600)] 
Remove some TODOs and add some fixes.

-Deltas creation is responsibility of vrps.c, so remove it from csv.c
-Remove unnecessary storage from heap (vrp structs, base DB an delta DB) and avoid some mem leaks.
-Change 'delta_resume' to 'delta_summary'.
-Handle error codes that were ignored.

6 years agoImplement callback for clients DB cleanup
pcarana [Fri, 22 Mar 2019 15:50:24 +0000 (09:50 -0600)] 
Implement callback for clients DB cleanup

6 years agoChange the default sync strategy to root
Alberto Leiva Popper [Fri, 22 Mar 2019 01:23:33 +0000 (19:23 -0600)] 
Change the default sync strategy to root

Fixes #6.

6 years agoRedo RFC 7935
Alberto Leiva Popper [Fri, 22 Mar 2019 01:19:20 +0000 (19:19 -0600)] 
Redo RFC 7935

It's a little faster, and also adds some missing validations.

6 years agoPatch memory leak
Alberto Leiva Popper [Thu, 21 Mar 2019 21:49:04 +0000 (15:49 -0600)] 
Patch memory leak

Probably fixes #5.

6 years agoGet the last bits of time shifting its value
pcarana [Thu, 21 Mar 2019 17:13:33 +0000 (11:13 -0600)] 
Get the last bits of time shifting its value

6 years agoRemove unnecessary indexing at some pointers
pcarana [Thu, 21 Mar 2019 15:09:44 +0000 (09:09 -0600)] 
Remove unnecessary indexing at some pointers

6 years agoFix several TODOs of review
pcarana [Thu, 21 Mar 2019 01:37:50 +0000 (19:37 -0600)] 
Fix several TODOs of review

6 years agoFormat line width (80) and 4 spaces indentation when needed, remove some TODOs
pcarana [Thu, 21 Mar 2019 00:46:46 +0000 (18:46 -0600)] 
Format line width (80) and 4 spaces indentation when needed, remove some TODOs

-Align definition of constants.
-csv.h and .c: add void param to 'csv_parse_vrps_file'.
-line_file.h: add missing param of 'lfile_close'.
-main.c: comment 'TODO This will be overriden [..]' was for developer, isn't valid since the conf will be loaded from the JSON file.
-notify.h and .c: add void param to 'notify_clients'.
-vrps.c: explain VRP meaning, how session ID is the existent solution to avoid serial desynchronization, and remove bad comment style.

6 years agoPatch two memory leaks and bad rsync
Alberto Leiva Popper [Wed, 20 Mar 2019 23:25:31 +0000 (17:25 -0600)] 
Patch two memory leaks and bad rsync

The 'root' download strategy should not apply to the certificate
pointed by the TAL, because we don't trust that URL at that point
yet.

Fixes #4.

6 years agoAdd NULL check after strdup
pcarana [Wed, 20 Mar 2019 23:22:24 +0000 (17:22 -0600)] 
Add NULL check after strdup

6 years agoStore Clients DB at stack, also fix incorrect line width
pcarana [Wed, 20 Mar 2019 22:59:51 +0000 (16:59 -0600)] 
Store Clients DB at stack, also fix incorrect line width

6 years agoMake listen queue configurable
pcarana [Wed, 20 Mar 2019 18:52:31 +0000 (12:52 -0600)] 
Make listen queue configurable

6 years agoReview, part one
Alberto Leiva Popper [Wed, 20 Mar 2019 02:06:11 +0000 (20:06 -0600)] 
Review, part one

6 years agoRemove some TODOs
pcarana [Tue, 19 Mar 2019 16:07:47 +0000 (10:07 -0600)] 
Remove some TODOs

6 years agoAssign correctly the VRPs when sending a serial notify
pcarana [Tue, 19 Mar 2019 16:07:04 +0000 (10:07 -0600)] 
Assign correctly the VRPs when sending a serial notify

6 years agoPatch small bugs found while documenting
Alberto Leiva Popper [Sat, 16 Mar 2019 03:01:53 +0000 (21:01 -0600)] 
Patch small bugs found while documenting

6 years agoCalculate and get changes between serials.
pcarana [Fri, 15 Mar 2019 15:41:08 +0000 (09:41 -0600)] 
Calculate and get changes between serials.

Use a base serial, the base will always be the last DB update.
Calculate the difference between the latest version and the past, and store it as delta.
Save pointers to deltas, increment last serial number when the update ops are complete.
Avoid to send duplicate announcements/withdrawals.

6 years agoPatch infinite loop introduced in the last commit
Alberto Leiva Popper [Fri, 15 Mar 2019 00:28:18 +0000 (18:28 -0600)] 
Patch infinite loop introduced in the last commit

6 years agoHandle ranges properly during IP comparisons
Alberto Leiva Popper [Fri, 15 Mar 2019 00:23:58 +0000 (18:23 -0600)] 
Handle ranges properly during IP comparisons

Hadn't implemented ranges when I implemented comparisons.
Then I forgot to update the code when I added ranges.

Fixes #3.

6 years agoLeave unit tests out of the build by default
Alberto Leiva Popper [Thu, 14 Mar 2019 16:44:08 +0000 (10:44 -0600)] 
Leave unit tests out of the build by default

For two reasons:

- They need the Check framework, which should not be a dependency
  for everyone.
- Check itself is the only dependency managed by pkg-config, so we
  don't want to force everyone to install that either.

No idea if any of this is good practice. But it's much easier to
explain in the documentation, so there you go.

6 years agoUpdate the README
Alberto Leiva Popper [Thu, 14 Mar 2019 04:49:35 +0000 (22:49 -0600)] 
Update the README

6 years agoSimplify some code
pcarana [Wed, 13 Mar 2019 18:57:45 +0000 (12:57 -0600)] 
Simplify some code

6 years agoShow error code when an error report PDU is received/sent
pcarana [Wed, 13 Mar 2019 18:16:01 +0000 (12:16 -0600)] 
Show error code when an error report PDU is received/sent

6 years agoRename some getters (current session ID and last serial number)
pcarana [Wed, 13 Mar 2019 17:51:41 +0000 (11:51 -0600)] 
Rename some getters (current session ID and last serial number)