NICMx / FORT-validator

RPKI cache validator
MIT License
50 stars 24 forks source link

Atomize output files (`--output.roa` and `--output.bgpsec`) #124

Open ydahhrk opened 5 months ago

ydahhrk commented 5 months ago

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
job commented 1 month ago

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:

Source: https://github.com/openbsd/src/blob/master/usr.sbin/rpki-client/output.c