diff options
author | kn <kn@cvs.openbsd.org> | 2019-01-29 10:58:32 +0000 |
---|---|---|
committer | kn <kn@cvs.openbsd.org> | 2019-01-29 10:58:32 +0000 |
commit | 4e707279c62597eb97b9afb403ab402a8ad0e907 (patch) | |
tree | 75220ff6fa86be5c2ddfd5f21b5afb349981c7a8 /sbin/pfctl/pfctl_parser.c | |
parent | 89a9729e5e95721024a2763632568bd7c2860494 (diff) |
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
Diffstat (limited to 'sbin/pfctl/pfctl_parser.c')
-rw-r--r-- | sbin/pfctl/pfctl_parser.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 9a1673a2df8..ee3c2926f1a 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.338 2018/09/16 19:36:33 bluhm Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.339 2019/01/29 10:58:31 kn Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -62,7 +62,6 @@ #include "pfctl_parser.h" #include "pfctl.h" -void copy_satopfaddr(struct pf_addr *, struct sockaddr *); void print_op (u_int8_t, const char *, const char *); void print_port (u_int8_t, u_int16_t, u_int16_t, const char *, int); void print_ugid (u_int8_t, unsigned, unsigned, const char *, unsigned); |