mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-23 21:31:07 +01:00
pf: Fix missing connection rate for DIOCGETSRCNODES
The function pf_src_node_copy() copies struct pf_ksrc_node to its ioctl counterpart. It was missing copying of the conn_rate field, even though the code for adjusting the output for pfctl was in place. Add copying of conn_rate. Reviewed by: kp Approved by: kp (mentor) MFC after: 2 weeks Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D47679
This commit is contained in:
parent
976ab1425d
commit
e8eb3096d8
@ -1570,6 +1570,7 @@ pf_src_node_copy(const struct pf_ksrc_node *in, struct pf_src_node *out)
|
|||||||
out->expire = 0;
|
out->expire = 0;
|
||||||
|
|
||||||
/* Adjust the connection rate estimate. */
|
/* Adjust the connection rate estimate. */
|
||||||
|
out->conn_rate = in->conn_rate;
|
||||||
diff = secs - in->conn_rate.last;
|
diff = secs - in->conn_rate.last;
|
||||||
if (diff >= in->conn_rate.seconds)
|
if (diff >= in->conn_rate.seconds)
|
||||||
out->conn_rate.count = 0;
|
out->conn_rate.count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user