From patchwork Tue Aug 29 13:48:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1827269 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=LPcDE4gC; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4RZpZ21whRz1yg3 for ; Tue, 29 Aug 2023 23:44:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233683AbjH2Nnw (ORCPT ); Tue, 29 Aug 2023 09:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236559AbjH2Nno (ORCPT ); Tue, 29 Aug 2023 09:43:44 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A1CD1BC for ; Tue, 29 Aug 2023 06:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WU4DmrzQr27m6kEV0HUwq/bOfuPcjtWUzHQMA7iU7SU=; b=LPcDE4gCLQkO1IUz+KW367k73U J7e9boleKbn0155L3NUOA+dVzN9oJLfR3Q3DznjE7OHGJA0fA44bb6T61/98LBzRL4kHVO2uA9cGm dQx9BSg2aSUWaw9nNIWlpHt5fzsLMd2iHve09NLwkTxj0dYaBIQSiyoPzFfmHCZKVwCO5Kv4A0xzg al/cS+EHa9qlQv+JvmSt0rbJVgeE5oEH4Gap7jhcZQ1Jlg2pAKlTYSO3Zr90DuDi6+/hfulHwsYMA vI26l2FNpt01lFKcPqObGlNVfVMekeLponbha6dBxMWYb1QeGxh/SVnhh2Aeep0wKiwbvkzI22dpH 9T7kcSZA==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.94.2) (envelope-from ) id 1qayzG-0000TA-Qa for netfilter-devel@vger.kernel.org; Tue, 29 Aug 2023 15:42:30 +0200 From: Phil Sutter To: netfilter-devel@vger.kernel.org Subject: [nft PATCH 1/4] tests: monitor: Fix monitor JSON output for insert command Date: Tue, 29 Aug 2023 15:48:09 +0200 Message-ID: <20230829134812.31863-1-phil@nwl.cc> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Looks like commit ba786ac758fba ("tests: monitor: update insert and replace commands") missed to also fix expected JSON output. Fixes: 48d20b8cf162e ("monitor: honor NLM_F_APPEND flag for rules") Signed-off-by: Phil Sutter --- tests/monitor/testcases/simple.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/monitor/testcases/simple.t b/tests/monitor/testcases/simple.t index 2d9c92de25dd3..c1c7bcfc08beb 100644 --- a/tests/monitor/testcases/simple.t +++ b/tests/monitor/testcases/simple.t @@ -15,7 +15,7 @@ J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "ex I insert rule ip t c counter accept O insert rule ip t c counter packets 0 bytes 0 accept -J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"counter": {"packets": 0, "bytes": 0}}, {"accept": null}]}}} +J {"insert": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"counter": {"packets": 0, "bytes": 0}}, {"accept": null}]}}} I replace rule ip t c handle 2 accept comment "foo bar" O delete rule ip t c handle 2 From patchwork Tue Aug 29 13:48:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1827268 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=P+McHraM; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4RZpZ16P9mz1yZs for ; Tue, 29 Aug 2023 23:44:25 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234036AbjH2Nny (ORCPT ); Tue, 29 Aug 2023 09:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236578AbjH2Nnr (ORCPT ); Tue, 29 Aug 2023 09:43:47 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06485CD1 for ; Tue, 29 Aug 2023 06:43:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=SW6DSsy7N8dnABuVHoWPk9JbIAyAcWwdrupW8HXoUm0=; b=P+McHraMdxrv/LG96Z+qTsWFGz Mrtq5tuOFo4ONf0y9/VDci5YRz0eGxIBi/Diavfh9tH1O0pW4UTB7ZQDDBU6vEAtHZ8vg8r+KN9nk uoDBna8AxySLf5L+/1RD0OSPEBSpJMQgjJu6NY/9Lmi60esYu2BboQlfyYcsR+x9+CP710saeKzcK 2YFkrpfWhFblq2N7DlMpgZIHVHC78cDGMbF/l53I7NnYfQ9QCOf/dc8LD5ZtZ/fHlXV5te2hZv1fT /VqhyLY45pRYi+Zlv2UDYeDXMeRxTRmIKCWAXhjB1OxPpS92FuDXk5J3biOWfJkOYLdQThFxIYF1t VSv0DBrQ==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.94.2) (envelope-from ) id 1qayzH-0000TE-3b for netfilter-devel@vger.kernel.org; Tue, 29 Aug 2023 15:42:31 +0200 From: Phil Sutter To: netfilter-devel@vger.kernel.org Subject: [nft PATCH 2/4] tests: monitor: Fix time format in ct timeout test Date: Tue, 29 Aug 2023 15:48:10 +0200 Message-ID: <20230829134812.31863-2-phil@nwl.cc> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230829134812.31863-1-phil@nwl.cc> References: <20230829134812.31863-1-phil@nwl.cc> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org The old "plain" numbers are still accepted (and assumed to be in seconds), but output will use units which is unexpected due to 'O -'. Adjust input instead of adding this subtly different output line. Fixes: 5c25c5a35cbd2 ("parser: allow ct timeouts to use time_spec values") Signed-off-by: Phil Sutter --- tests/monitor/testcases/object.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/monitor/testcases/object.t b/tests/monitor/testcases/object.t index 2afe33c812571..53a9f8c59836b 100644 --- a/tests/monitor/testcases/object.t +++ b/tests/monitor/testcases/object.t @@ -37,7 +37,7 @@ I delete ct helper ip t cth O - J {"delete": {"ct helper": {"family": "ip", "name": "cth", "table": "t", "handle": 0, "type": "sip", "protocol": "tcp", "l3proto": "ip"}}} -I add ct timeout ip t ctt { protocol udp; l3proto ip; policy = { unreplied : 15, replied : 12 }; } +I add ct timeout ip t ctt { protocol udp; l3proto ip; policy = { unreplied : 15s, replied : 12s }; } O - J {"add": {"ct timeout": {"family": "ip", "name": "ctt", "table": "t", "handle": 0, "protocol": "udp", "l3proto": "ip", "policy": {"unreplied": 15, "replied": 12}}}} From patchwork Tue Aug 29 13:48:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1827267 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=JxjXorni; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4RZpYy4flVz1yZs for ; Tue, 29 Aug 2023 23:44:22 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231758AbjH2Nnw (ORCPT ); Tue, 29 Aug 2023 09:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236591AbjH2Nns (ORCPT ); Tue, 29 Aug 2023 09:43:48 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96194CDD for ; Tue, 29 Aug 2023 06:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ud9ycw8j+F7UsKYBbtmq1XG0ytnkE/NCJhTXjE7Ugc4=; b=JxjXorniiXJH5kk77VOUEZgl9G 9Q0Yy+KsOitkOvcwjIlOBeHg/png5c/Jj+br/Rou9XRQiSSncGwFoyKwnZRLipHTpKDcGLj4V3cJg gtc9832uccZgBuu+EGMXuasaXVnfBwVua5YkTT2u9vlyDPN9HTwqfP3tfny3ePVbK5oi7DiBZyEad EiyBLB3OE08Wpjw9S04oab3yF84/2hB5lmWttbBxM+TRrcT4OgJ82zB5neL34sMv6DvCjaiFkRnTw HMiV9t+jHg7ZuhMxxuTjuGvQLtJ9X1YFTJtbLWdto1WEq39BGVmHB1q1iwB7Cb0qROWuscBO6U0mR R3zO3j5Q==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.94.2) (envelope-from ) id 1qayzH-0000TI-CA for netfilter-devel@vger.kernel.org; Tue, 29 Aug 2023 15:42:31 +0200 From: Phil Sutter To: netfilter-devel@vger.kernel.org Subject: [nft PATCH 3/4] tests: monitor: Fix for wrong syntax in set-interval.t Date: Tue, 29 Aug 2023 15:48:11 +0200 Message-ID: <20230829134812.31863-3-phil@nwl.cc> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230829134812.31863-1-phil@nwl.cc> References: <20230829134812.31863-1-phil@nwl.cc> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Expected JSON output must be prefixed 'J'. Fixes: 7ab453a033c9a ("monitor: do not call interval_map_decompose() for concat intervals") Signed-off-by: Phil Sutter --- tests/monitor/testcases/set-interval.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/monitor/testcases/set-interval.t b/tests/monitor/testcases/set-interval.t index b0649cdfe01e6..5053c596b3b1b 100644 --- a/tests/monitor/testcases/set-interval.t +++ b/tests/monitor/testcases/set-interval.t @@ -27,4 +27,4 @@ J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "ex # ... and anon concat range I add rule ip t c ether saddr . ip saddr { 08:00:27:40:f7:09 . 192.168.56.10-192.168.56.12 } O - -{"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"match": {"op": "==", "left": {"concat": [{"payload": {"protocol": "ether", "field": "saddr"}}, {"payload": {"protocol": "ip", "field": "saddr"}}]}, "right": {"set": [{"concat": ["08:00:27:40:f7:09", {"range": ["192.168.56.10", "192.168.56.12"]}]}]}}}]}}} +J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"match": {"op": "==", "left": {"concat": [{"payload": {"protocol": "ether", "field": "saddr"}}, {"payload": {"protocol": "ip", "field": "saddr"}}]}, "right": {"set": [{"concat": ["08:00:27:40:f7:09", {"range": ["192.168.56.10", "192.168.56.12"]}]}]}}}]}}} From patchwork Tue Aug 29 13:48:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1827270 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nwl.cc header.i=@nwl.cc header.a=rsa-sha256 header.s=mail2022 header.b=Ev6a5Mah; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4RZpZ24LGQz1yhC for ; Tue, 29 Aug 2023 23:44:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234193AbjH2Nny (ORCPT ); Tue, 29 Aug 2023 09:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236555AbjH2Nno (ORCPT ); Tue, 29 Aug 2023 09:43:44 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A63E1BD for ; Tue, 29 Aug 2023 06:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nwl.cc; s=mail2022; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0HbVWAVbF9GTV/yM8S5rWMWYLJ7ytyMFxf3OR4yaVyc=; b=Ev6a5MahD7edT7hBfDSovfTMQ8 N9WYZ3yr8pueY3z1YDjUCgyhg4vTFuNGxp5FNe2jXe+aBVIZjx4aFRW+cnxuaTrfdWukaXMoJETDK g0hQRtKhcvXp5j7FLzSu1YjDjr1pXyN8Zc0DrqdFO90RQZtoHOjngzPfgTfMNBrzEZ8ivPyg8NmU/ CIsS7xhobcgVFKXAWwB/oKSxb6cRrDKpkzgGD5gjoJ9aamskNDaXn0vPeTyMOOCDDkkhXoga0SPbz XWypBMUMBAD8E3iMBXTOqO3ID9vm/8n41et7LweerQhoSUIAoZHIkG7Fx/JzXj477it6SpQDePCzf xwpymjVA==; Received: from localhost ([::1] helo=xic) by orbyte.nwl.cc with esmtp (Exim 4.94.2) (envelope-from ) id 1qayzG-0000T5-H6 for netfilter-devel@vger.kernel.org; Tue, 29 Aug 2023 15:42:30 +0200 From: Phil Sutter To: netfilter-devel@vger.kernel.org Subject: [nft PATCH 4/4] tests: monitor: Fix for wrong ordering in expected JSON output Date: Tue, 29 Aug 2023 15:48:12 +0200 Message-ID: <20230829134812.31863-4-phil@nwl.cc> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230829134812.31863-1-phil@nwl.cc> References: <20230829134812.31863-1-phil@nwl.cc> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Adjust JSON for delete before add for replace after respective kernel fix, too. Fixes: ba786ac758fba ("tests: monitor: update insert and replace commands") Signed-off-by: Phil Sutter --- tests/monitor/testcases/simple.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/monitor/testcases/simple.t b/tests/monitor/testcases/simple.t index c1c7bcfc08beb..67be5c85ab85d 100644 --- a/tests/monitor/testcases/simple.t +++ b/tests/monitor/testcases/simple.t @@ -20,8 +20,8 @@ J {"insert": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, I replace rule ip t c handle 2 accept comment "foo bar" O delete rule ip t c handle 2 O add rule ip t c handle 5 accept comment "foo bar" -J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "comment": "foo bar", "expr": [{"accept": null}]}}} J {"delete": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "expr": [{"accept": null}]}}} +J {"add": {"rule": {"family": "ip", "table": "t", "chain": "c", "handle": 0, "comment": "foo bar", "expr": [{"accept": null}]}}} I add counter ip t cnt O add counter ip t cnt { packets 0 bytes 0 }