diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-02-18 13:11:45 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-02-18 13:11:45 +0000 |
commit | eb2ef85dc6e63b8f2819256c12559a69f528fea5 (patch) | |
tree | 5f196c9d5605c9c7afa23f1437f30f650d3a57cb /sys/net/pfvar.h | |
parent | 1c77d48cef6cfdd244d5009e27be22dbb488b2b9 (diff) |
Change ps_len of struct pfioc_states and psn_len of struct
pfioc_src_nodes to size_t. This avoids integer truncation by casts
to unsigned. As the types of DIOCGETSTATES and DIOCGETSRCNODES
ioctl(2) arguments change, pfctl(8) and systat(1) should be updated
together with the kernel. Calculate number of pf(4) states as
size_t in userland.
OK sashan@ deraadt@
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r-- | sys/net/pfvar.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 67283c9463b..8f074821d28 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.489 2018/12/17 15:37:41 kn Exp $ */ +/* $OpenBSD: pfvar.h,v 1.490 2019/02/18 13:11:44 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1496,7 +1496,7 @@ struct pfioc_state_kill { }; struct pfioc_states { - int ps_len; + size_t ps_len; union { caddr_t psu_buf; struct pfsync_state *psu_states; @@ -1506,7 +1506,7 @@ struct pfioc_states { }; struct pfioc_src_nodes { - int psn_len; + size_t psn_len; union { caddr_t psu_buf; struct pf_src_node *psu_src_nodes; |