]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Fix warnings at man, fix bug: rsync wasn't executed on each validation
authorpcarana <pc.moreno2099@gmail.com>
Thu, 13 Jun 2019 20:49:05 +0000 (15:49 -0500)
committerpcarana <pc.moreno2099@gmail.com>
Thu, 13 Jun 2019 20:49:05 +0000 (15:49 -0500)
man/fort.8
src/main.c
src/object/tal.c

index 41d451799805be674984c40813bff3490d612c75..6eeeb73da3aca19795a24e2093025df4062a854d 100644 (file)
@@ -439,6 +439,7 @@ Run FORT using the JSON configuration file \fIconf.json\fR.
      \-\-server.address ::1 \-\-server.port 9323 \\
      \-\-server.validation-interval 1800 \\
      \-\-output.roa /tmp/roas.csv\fR
+.fi
 .RS 4
 Run FORT with RTR server listening on IPv6 address \fI::1\fR, port 9323,
 validating every 30 minutes, and printing the ROAs CSV in a file.
@@ -497,7 +498,7 @@ to a specific value:
     "roa": "/tmp/roas.csv"
   }
 }
-.ni
+.fi
 .RE
 .P
 
@@ -544,8 +545,8 @@ assertions:
     "bgpsecAssertions": []
    }
 }
+.fi
 .RE
-.ni
 .P
 
 .\".SH COPYRIGHT
index 373da9ab71990abe6df6bf27c9660545f731e948..66ffb346dbbc71f82cf76e5b434d54b6f7feb762 100644 (file)
@@ -4,7 +4,6 @@
 #include "extension.h"
 #include "nid.h"
 #include "thread_var.h"
-#include "rsync/rsync.h"
 #include "rtr/rtr.h"
 #include "rtr/db/vrps.h"
 
@@ -42,12 +41,9 @@ main(int argc, char **argv)
        if (error)
                return error;
 
-       error = rsync_init();
-       if (error)
-               goto revert_config;
        error = nid_init();
        if (error)
-               goto revert_rsync;
+               goto revert_config;
        error = extension_init();
        if (error)
                goto revert_nid;
@@ -56,8 +52,6 @@ main(int argc, char **argv)
 
 revert_nid:
        nid_destroy();
-revert_rsync:
-       rsync_destroy();
 revert_config:
        free_rpki_config();
        return error;
index 7ff8c0eaa5b393c9a5a83c2acaab4b7d203afc8b..f0923836135ea108b942a63de7df29c390fa7213 100644 (file)
@@ -399,10 +399,15 @@ perform_standalone_validation(struct validation_handler *handler)
 {
        int error;
 
+       error = rsync_init();
+       if (error)
+               return error;
+
        fnstack_init();
        error = process_file_or_dir(config_get_tal(), TAL_FILE_EXTENSION,
            do_file_validation, handler);
        fnstack_cleanup();
+       rsync_destroy();
 
        return error;
 }