From nobody Thu Nov 21 14:28:04 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvLDh2Zyhz5d9Jb; Thu, 21 Nov 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvLDh25fLz44wm; Thu, 21 Nov 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MA7Aw0m/7CCo8e9F0OIH+/A9de0RirzRhB80g5dawE=; b=SyxrYETO6Yp9fDMW/5idCrc0mTlVnVwTbLOu81l7EkY2QPGjc23f/FZjOod/pWHA1tKoqP O36QUrFPLe5kGJJExsFLy2ap8ObeXdgLsYbz9RImuKXlYVGuPICvtAea4eA7qmtcIj4Cd/ W20gsNgTWnimhl4VRfzQEdIwFbQGM2GWLSVOjMZayedFQPlcuSXNCvwsGZwCKtfM7G9m8m XSPx2TVeai64z3KC2wBRa6Zro0mF/QPHAFo/nM3bSJLQcccn114oWsxzRUozCjTV7md+Q7 CnJjjv0WYpEUhV3IGFWKVFZf9VYg2cBHxNbPW8Mf7ipwxnNnMwLjRTMr7Pz20w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732199284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/MA7Aw0m/7CCo8e9F0OIH+/A9de0RirzRhB80g5dawE=; b=lcWa1l0qOy2/WHJwGoguUurKLcMSHcA2Sy1QmUyYasrUE3KWPWCxtXnCBOBF07nS4KBh5N W84HMu2VtIkobWCW7183KtKbhKHlguFElZt37LEDDPU6E8qn6cVGHaRNJewuo7Nnb+nDfD ZJZmkyflgR4bxS6dFD8sa3cex6nLVV2unZhpoYj1xwYTCcxA2+EcPHcJiMScnBhaJ7O6kX clq3sFtyf6/ybfJzVfLFkecgm8AOg0QqQj6qHKhdAS4Lvpn24T64hdg46PESHw9z8MmfkU MDZm3drphUOkknPk0q5ONCi4cSLWPm3JOiwKahcAPEBZvZHTZGQWloVboiuV0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732199284; a=rsa-sha256; cv=none; b=BPNJvfbB6o3jUw3egi4D9S0tcvGkJkbjSVyU7b7wWZEbY+iXQzEcQ5OYYCc8V5lgw5fi5j 1j5Dh/i/qjIcEioTQu3etSvq/reNFAFu/piJBY/pox9mYF5lV7YqdIvFTksnkFSq7Xsi/x iPnNOW0c9C5GnHYjyCss+Z7oOW8+I51vN7riQh7Qs3ZNO6KYnXKAad9QAHzme4jm6fV/k9 nZ3cm04epSnKJ5FtnysY1ujgS67MeARzCw1ycZvdhPrNZaR2OEWKKzONSs9WUMhupUVLpH zZhGaxWS9JJfwUPp99CSeQOEhx/41gg1hFK7nqlExjEJDUzcuBiYaaRy+x1eAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvLDh1hvCzjtm; Thu, 21 Nov 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALES4Qc010814; Thu, 21 Nov 2024 14:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALES4Nk010811; Thu, 21 Nov 2024 14:28:04 GMT (envelope-from git) Date: Thu, 21 Nov 2024 14:28:04 GMT Message-Id: <202411211428.4ALES4Nk010811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kajetan Staszkiewicz Subject: git: e8eb3096d8d1 - main - pf: Fix missing connection rate for DIOCGETSRCNODES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8eb3096d8d140edc506aab40761d1f00bf3e9e8 Auto-Submitted: auto-generated The branch main has been updated by ks: URL: https://cgit.FreeBSD.org/src/commit/?id=e8eb3096d8d140edc506aab40761d1f00bf3e9e8 commit e8eb3096d8d140edc506aab40761d1f00bf3e9e8 Author: Kajetan Staszkiewicz AuthorDate: 2024-11-21 14:23:42 +0000 Commit: Kajetan Staszkiewicz CommitDate: 2024-11-21 14:27:28 +0000 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 --- sys/netpfil/pf/pf_ioctl.c | 1 + 1 file changed, 1 insertion(+) 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;