CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/12/01 08:34:15
Modified files:
usr.sbin/rpki-client: extern.h ip.c roa.c validate.c
Log message:
rpki-client: remove min/max arrays from struct roa_ip
struct roa_ip, representing a ROAIPaddress (afi, prefix, maxLength) of
a ROA, contains a copy of ->addr.addr in min and the corresponding upper
bound of the prefix in max. Both members were only accessed once when
checking against the EE cert's resources via ip_addr_check_covered().
We may as well compute the upper bound on the fly.
So: inline valid_roa() in roa_validate() and inline the still needed half
of ip_roa_compose_ranges() and drop these nearly useless members.
This reduces the struct from 56 bytes to 24 bytes with only one byte of
padding remaining. While struct roa isn't super long lived in either of
the two processes where it is used, this still reduces the memory foot
print a bit (the largest roa, AS9808.roa, has 20653 prefixes, so this saves
about 650 KiB for that one alone).
ok claudio