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

6 years agoSupport only RTR v0 (for now)
pcarana [Wed, 13 Mar 2019 17:45:27 +0000 (11:45 -0600)] 
Support only RTR v0 (for now)

6 years agoRemove segfault
pcarana [Mon, 11 Mar 2019 19:12:13 +0000 (13:12 -0600)] 
Remove segfault

6 years agoUse Error PDUs handling methods and prepare to send other error PDUs
pcarana [Mon, 11 Mar 2019 17:52:36 +0000 (11:52 -0600)] 
Use Error PDUs handling methods and prepare to send other error PDUs

Send Unexpected Protocol Version when needed.
Simplify 'send_error_report_pdu' call.
Remove error codes definitions from 'pdu.h'.
Send Unsupported PDU error when such PDUs arrive to the server.
Try to close socket when a fatal Error PDU is received.
Log errno when there's an error sending a response.

6 years agoCreate custom handling methods for Error PDUs
pcarana [Mon, 11 Mar 2019 17:38:23 +0000 (11:38 -0600)] 
Create custom handling methods for Error PDUs

6 years agoSend only header of erroneous PDU at Error Report PDU
pcarana [Fri, 8 Mar 2019 16:25:11 +0000 (10:25 -0600)] 
Send only header of erroneous PDU at Error Report PDU

6 years agoSet VRPs check interval min value to 60 secs
pcarana [Fri, 8 Mar 2019 15:32:54 +0000 (09:32 -0600)] 
Set VRPs check interval min value to 60 secs

6 years agoRemove unused ttl, the client is related to the socket file descriptor
pcarana [Fri, 8 Mar 2019 15:28:57 +0000 (09:28 -0600)] 
Remove unused ttl, the client is related to the socket file descriptor

6 years agoNotify clients when CSV data is updated
pcarana [Thu, 7 Mar 2019 23:24:57 +0000 (17:24 -0600)] 
Notify clients when CSV data is updated

6 years agoAdd file descriptor to client, and create function to fetch all clients
pcarana [Thu, 7 Mar 2019 23:20:35 +0000 (17:20 -0600)] 
Add file descriptor to client, and create function to fetch all clients

6 years agoReplace unnecessary header
pcarana [Thu, 7 Mar 2019 18:26:52 +0000 (12:26 -0600)] 
Replace unnecessary header

6 years agoRemember connected clients
pcarana [Thu, 7 Mar 2019 01:03:45 +0000 (19:03 -0600)] 
Remember connected clients

Use sockaddr_storage to fetch both IPv4 & 6 socket info.
Fetch the RTR version when the PDU is loaded.
Expose client data for later use (Serial Notify PDU).

6 years agoUse NULL instead of start_serial (is the same thing)
pcarana [Thu, 7 Mar 2019 00:54:41 +0000 (18:54 -0600)] 
Use NULL instead of start_serial (is the same thing)

6 years agoCreate 'state' struct to store instance values/db
pcarana [Thu, 7 Mar 2019 00:52:46 +0000 (18:52 -0600)] 
Create 'state' struct to store instance values/db

6 years agoForce cache reset on db update, use millisecs at last update of db file
pcarana [Tue, 5 Mar 2019 21:31:22 +0000 (15:31 -0600)] 
Force cache reset on db update, use millisecs at last update of db file

6 years agoSend correct 'last serial number', remove uninitialized var warning
pcarana [Tue, 5 Mar 2019 21:28:27 +0000 (15:28 -0600)] 
Send correct 'last serial number', remove uninitialized var warning

6 years agoCreate daemon and conf to look for VRPs file updates
pcarana [Tue, 5 Mar 2019 00:33:24 +0000 (18:33 -0600)] 
Create daemon and conf to look for VRPs file updates

6 years agoSimplify some code
pcarana [Thu, 28 Feb 2019 21:56:02 +0000 (15:56 -0600)] 
Simplify some code

6 years agoImplement Serial Notify PDU (isn't sent yet)
pcarana [Thu, 28 Feb 2019 21:30:55 +0000 (15:30 -0600)] 
Implement Serial Notify PDU (isn't sent yet)

6 years agoAdd session ID per protocol version
pcarana [Thu, 28 Feb 2019 21:06:57 +0000 (15:06 -0600)] 
Add session ID per protocol version

6 years agoUse timestamp as session ID
pcarana [Thu, 28 Feb 2019 19:55:08 +0000 (13:55 -0600)] 
Use timestamp as session ID

6 years agoAdd intervals validation
pcarana [Thu, 28 Feb 2019 15:34:59 +0000 (09:34 -0600)] 
Add intervals validation

6 years agoAvoid possible buffer overflow
pcarana [Thu, 28 Feb 2019 14:42:40 +0000 (08:42 -0600)] 
Avoid possible buffer overflow

6 years agoImplement error report PDU and send when no data is available
pcarana [Thu, 28 Feb 2019 14:33:33 +0000 (08:33 -0600)] 
Implement error report PDU and send when no data is available

6 years agoRelease allocated line-copy
pcarana [Wed, 27 Feb 2019 22:23:04 +0000 (16:23 -0600)] 
Release allocated line-copy

6 years agoRename error variable and add warn log on error PDU
pcarana [Tue, 26 Feb 2019 22:46:40 +0000 (16:46 -0600)] 
Rename error variable and add warn log on error PDU

6 years agoImplement serial logic, prepare to calculate diff between serials
pcarana [Tue, 26 Feb 2019 22:45:18 +0000 (16:45 -0600)] 
Implement serial logic, prepare to calculate diff between serials

6 years agoImplement Cache Reset PDU (it has some TODOs to complete PDU exchange)
pcarana [Fri, 22 Feb 2019 15:51:34 +0000 (09:51 -0600)] 
Implement Cache Reset PDU (it has some TODOs to complete PDU exchange)

6 years agoAdd VRP flags to use at IPvx prefix PDU, and update PDU header length
pcarana [Fri, 22 Feb 2019 15:20:18 +0000 (09:20 -0600)] 
Add VRP flags to use at IPvx prefix PDU, and update PDU header length

6 years agoSend VRPs payloads, data buffer is now used from one place
pcarana [Fri, 22 Feb 2019 01:12:39 +0000 (19:12 -0600)] 
Send VRPs payloads, data buffer is now used from one place

6 years agoAdd missing stdlib header
pcarana [Fri, 22 Feb 2019 01:05:49 +0000 (19:05 -0600)] 
Add missing stdlib header

6 years agoAdd IPvx prefix PDU types and serialization, create buffer struct
pcarana [Fri, 22 Feb 2019 01:02:38 +0000 (19:02 -0600)] 
Add IPvx prefix PDU types and serialization, create buffer struct

6 years agoFix IP address serialization, and quick format to header decls
pcarana [Fri, 22 Feb 2019 01:00:05 +0000 (19:00 -0600)] 
Fix IP address serialization, and quick format to header decls

6 years agoMove all the send functions to new 'pdu_sender'
pcarana [Thu, 21 Feb 2019 17:31:47 +0000 (11:31 -0600)] 
Move all the send functions to new 'pdu_sender'

6 years agoFix a couple of bugs, implement Reset Query PDU handler.
pcarana [Wed, 20 Feb 2019 23:54:55 +0000 (17:54 -0600)] 
Fix a couple of bugs, implement Reset Query PDU handler.

Bugs fixed: add stdio.h, send VERDICT_SUCCESS if client_fd >= 0, use correct
pointer when handling PDUs (all at rtr.c).
Handle Reset Query PDU sending Cache Response and End of Data PDUs.
Add RTR version constants (0 and 1) and some PDU types for responses.

6 years agoAdd PDUs serializer and a common buffer writer
pcarana [Wed, 20 Feb 2019 23:33:34 +0000 (17:33 -0600)] 
Add PDUs serializer and a common buffer writer

6 years agoAdd intervals conf for RTRv1 End of Data PDU
pcarana [Wed, 20 Feb 2019 23:14:19 +0000 (17:14 -0600)] 
Add intervals conf for RTRv1 End of Data PDU

6 years agoFix segfault when destroying vrps
pcarana [Tue, 19 Feb 2019 14:18:37 +0000 (08:18 -0600)] 
Fix segfault when destroying vrps

6 years agoSave in memory the VRPs loaded from CSV
pcarana [Mon, 18 Feb 2019 16:29:40 +0000 (10:29 -0600)] 
Save in memory the VRPs loaded from CSV

6 years agoRead VRPs from a CSV file set at JSON config
pcarana [Thu, 14 Feb 2019 15:38:04 +0000 (09:38 -0600)] 
Read VRPs from a CSV file set at JSON config

6 years agoCode review
Alberto Leiva Popper [Thu, 7 Feb 2019 16:32:17 +0000 (10:32 -0600)] 
Code review

Patched some segfaults, removed some redundant code, added more
sensible defaults.

6 years agoRead the host address as a hostname
dhfelix [Fri, 14 Dec 2018 02:39:58 +0000 (20:39 -0600)] 
Read the host address as a hostname

Converts the hostname to its equivalent in IPv4 or IPv6

6 years agoAdd jansson reference as json parser
dhfelix [Fri, 9 Nov 2018 22:12:02 +0000 (16:12 -0600)] 
Add jansson reference as json parser

7 years agoAdd unit testing framework
Alberto Leiva Popper [Wed, 29 Aug 2018 22:23:03 +0000 (17:23 -0500)] 
Add unit testing framework

And fix some bugs as a side effect.

7 years agoImprove the autotools config
Alberto Leiva Popper [Thu, 23 Aug 2018 22:38:53 +0000 (17:38 -0500)] 
Improve the autotools config

The idea is to make it debian-packaging friendly.
It should work out of the box if appended a minimalistic debian
directory now.

7 years agoAdd the traditional autoconf/automake mess
Alberto Leiva Popper [Thu, 23 Aug 2018 02:19:04 +0000 (21:19 -0500)] 
Add the traditional autoconf/automake mess

7 years agoAdd string parsing to RTR
Alberto Leiva Popper [Thu, 23 Aug 2018 02:14:21 +0000 (21:14 -0500)] 
Add string parsing to RTR

Rob Austein, author of RFCs 6810 and 8210, clarified that string
length unit is octets. Dumping according (still untested) code.

7 years agoAdd RTR socket draft
Alberto Leiva Popper [Thu, 16 Aug 2018 16:41:12 +0000 (11:41 -0500)] 
Add RTR socket draft

7 years agoInitial commit
Alberto Leiva Popper [Thu, 16 Aug 2018 16:23:32 +0000 (11:23 -0500)] 
Initial commit