diff options
| author | Kajetan Staszkiewicz <ks@FreeBSD.org> | 2024-11-21 14:23:42 +0000 |
|---|---|---|
| committer | Kajetan Staszkiewicz <ks@FreeBSD.org> | 2024-11-21 14:27:28 +0000 |
| commit | e8eb3096d8d140edc506aab40761d1f00bf3e9e8 (patch) | |
| tree | f7aca185950cb303651bb1285c4793b8f6c62d35 | |
| parent | 976ab1425da44b0dbd2b832599db229a1efc2d9e (diff) | |
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
| -rw-r--r-- | sys/netpfil/pf/pf_ioctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index c3f0166810ec..59c442698b95 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1570,6 +1570,7 @@ pf_src_node_copy(const struct pf_ksrc_node *in, struct pf_src_node *out) out->expire = 0; /* Adjust the connection rate estimate. */ + out->conn_rate = in->conn_rate; diff = secs - in->conn_rate.last; if (diff >= in->conn_rate.seconds) out->conn_rate.count = 0; |
