FORT-validator
FORT-validator copied to clipboard
Atomize output files (`--output.roa` and `--output.bgpsec`)
These files were originally created for debugging reasons, so Fort handles them somewhat carelessly.
But --output.roa has turned out to be useful, so it would be nice if it were more script-friendly. It sometimes contains less information than it's supposed to, presumably while Fort is writing it.
Workaround: Try rtrclient from rtrlib:
rtrclient -e -t csv -o roas.csv tcp localhost 323
Indeed the issue is that the program writes into a file while another program might be reading from it.
I recommend copying some code from OpenBSD/FreeBSD:
- first write into a temp file 1
- when done writing,
rename()the temp file to the final destination 1 - use a sighandler so that upon crash/exit the temp files get removed 1 and 2
Source: https://github.com/openbsd/src/blob/master/usr.sbin/rpki-client/output.c