roasort

ROA sorter in C

4
0
4
C
public

ROASORT(8) - System Manager’s Manual

NAME

roasort - order and deduplicate ROA ip address information

DESCRIPTION

The
roasort
utility reads a list of newline separated ROA IP address information
elements from
stdin.
Information elements are in the form: <address/prefixlength>[-maxlength].

The utility can be used in two ways: the error exit code indicates
whether the input was in canonical form or not, and the canonical form
is written to the standard output.

The utility sorts and deduplicates the elements according to the
canonicalization process described in RFC 9582, Section 4.3.3.

EXIT STATUS

The
roasort
utility exits 0 on success, and >0 if an error occurs, such as the input
containing duplicates or being unsorted.

EXAMPLES

$ cat << EOF | ./roasort
10.0.0.0/24
10.0.0.0/24-24
10.0.0.0/8
2001:db8:db8::/48
2001:db8::/32
EOF
10.0.0.0/8
10.0.0.0/24
2001:db8::/32
2001:db8:db8::/48
$ echo $?
1

$ echo "2001:db8::/32-33\n2001:db8::/48" | ./roasort
2001:db8::/32-33
2001:db8::/48
$ echo $?
0

STANDARDS

J. Snijders,
B. Maddison, and
M. Lepinski, and
D. Kong, and
S. Kent,
A Profile for Route Origin Authorizations (ROAs),
RFC 9582.

AUTHORS

Job Snijders <job@bsd.nl>

OpenBSD 7.8 - March 12, 2026 - ROASORT(8)

v0.3.3[beta]