CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2019/01/29 03:58:31
Modified files: sbin/pfctl : pfctl.c pfctl_parser.c pfctl_parser.h Log message: Reuse copy_satopfaddr() when killing entries Recently introduced in pfctl_parser.c r1.333, this helper nicely simplifies code when copying IPs based on their address family, so use it in five other places when killing state or source node entries. All addresses copied in these code paths result from either pfctl_parse_host() or pfctl_addrprefix() which guarantee the address family set to AF_INET or AF_INET6. Therefore, effectively relaxing the case of unhandled families from errx(3) in callers to warnx(3) in copy_satopfaddr() is safe since it's never reached. OK sashan