From nobody Sat Oct 30 21:39:20 2021 X-Original-To: freebsd-pf@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 1A5C2183387D for ; Sat, 30 Oct 2021 21:39:10 +0000 (UTC) (envelope-from freebsd@ohreally.nl) Received: from rambler.ohreally.nl (rambler.ohreally.nl [51.15.8.63]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4HhXk53gnLz3N5F for ; Sat, 30 Oct 2021 21:39:09 +0000 (UTC) (envelope-from freebsd@ohreally.nl) Received: from authenticated-user by rambler.ohreally.nl (Postfix) with ESMTPSA id 0543D1D77A90 for ; Sat, 30 Oct 2021 23:39:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ohreally.nl; s=dkim; t=1635629948; r=y; bh=Vs9n9OT6401rfrplP616rZP3UqZFk+b8N1jBu99K9IA=; h=Date:To:From:Subject; b=tDamadie54xvxSS6TMChhQTWBqsfnEqCF3pXXW4prnYegBgLWzH31cD1o0aE/AYnN LwSGhYkDP1AjylyDEuuyeVoktvB0ajT1LC2X8OvAT+Ihuzez5BZkbsSaZhI+9/KUsv rPz0CXJHfcR8zDyDdEw/rnT9GDWxpl8WXXoEnmr0= Message-ID: <5e0d78b2-6ae5-b068-100d-0c4d0c8f8058@ohreally.nl> Date: Sat, 30 Oct 2021 23:39:20 +0200 List-Id: Technical discussion and general questions about packet filter (pf) List-Archive: https://lists.freebsd.org/archives/freebsd-pf List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pf@freebsd.org X-BeenThere: freebsd-pf@freebsd.org MIME-Version: 1.0 Content-Language: en-US To: freebsd-pf@freebsd.org From: freebsd@ohreally.nl Subject: How to reset counters selectively? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.3 at rambler.ohreally.nl X-Virus-Status: Clean X-Rspamd-Queue-Id: 4HhXk53gnLz3N5F X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ohreally.nl header.s=dkim header.b=tDamadie; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@ohreally.nl designates 51.15.8.63 as permitted sender) smtp.mailfrom=freebsd@ohreally.nl X-Spamd-Result: default: False [2.86 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[ohreally.nl:s=dkim]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-pf@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_SPAM_MEDIUM(0.38)[0.377]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[ohreally.nl]; NEURAL_SPAM_SHORT(1.00)[1.000]; DKIM_TRACE(0.00)[ohreally.nl:+]; NEURAL_SPAM_LONG(0.99)[0.986]; FROM_NO_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:12876, ipnet:51.15.0.0/17, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hello everyone, I'm running into this question that seems simple to me, but I can't find a satisfying answer, so probably it's not as simple as I think. I'd like to selectively reset counters to zero, but only if they are currently not zero. I hope you don't mind if I redirect you to the FreeBSD forums, instead of repeating the (short) discussion I had there, and risking the loss of information. The thread is here: https://forums.freebsd.org/threads/pf-counters-how-do-i-reset-them-selectively.82649/ Thanks in advance for any response. Best, Rob -- :wq