summaryrefslogtreecommitdiff
path: root/sbin/umount/umount.c
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2019-01-28 10:25:21 +0000
committerkn <kn@cvs.openbsd.org>2019-01-28 10:25:21 +0000
commit26c8d2d12930baad257bc15f0ad101e12453f39f (patch)
tree00e8598966b7c334be8f68388df67d806b602f36 /sbin/umount/umount.c
parent9707d88efadcdb547df32453ab9c60297f444296 (diff)
Simplify lookups when killing entries
Killing source tracking or state entries by hostname or CIDR would pass given keys twice to getaddrinfo(3): once to resolve/parse and again to parse the numerical address in case a prefix was specified. Avoid this overhead by making pfctl_addrprefix() resolve, pass and mask in one go and return the list of IPs to the callers. This notably simplifies both logic and sanity checks around prefix length and address family. While here, also pass -N along such that -k and -K can be restricted to not use DNS. Discussed with procter sashan, OK sashan
Diffstat (limited to 'sbin/umount/umount.c')
0 files changed, 0 insertions, 0 deletions