Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01C59C00A89 for ; Fri, 30 Oct 2020 19:39:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A48A5206CB for ; Fri, 30 Oct 2020 19:39:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727364AbgJ3TjG (ORCPT ); Fri, 30 Oct 2020 15:39:06 -0400 Received: from correo.us.es ([193.147.175.20]:37482 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726625AbgJ3Til (ORCPT ); Fri, 30 Oct 2020 15:38:41 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id 893BA1BFA87 for ; Fri, 30 Oct 2020 20:38:39 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 7B530DA704 for ; Fri, 30 Oct 2020 20:38:39 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 70FF4DA73F; Fri, 30 Oct 2020 20:38:39 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 36C4EDA78A for ; Fri, 30 Oct 2020 20:38:37 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Fri, 30 Oct 2020 20:38:37 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from localhost.localdomain (unknown [90.77.255.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pneira@us.es) by entrada.int (Postfix) with ESMTPSA id 2173A42EF42B for ; Fri, 30 Oct 2020 20:38:37 +0100 (CET) X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Subject: [PATCH nft] tests: shell: exercise validate with nft -c Date: Fri, 30 Oct 2020 20:38:34 +0100 Message-Id: <20201030193834.26945-1-pablo@netfilter.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Using oif in fib from prerouting is not support, make sure -c reports an error. Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/nft-f/0023check_1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 tests/shell/testcases/nft-f/0023check_1 diff --git a/tests/shell/testcases/nft-f/0023check_1 b/tests/shell/testcases/nft-f/0023check_1 new file mode 100755 index 000000000000..42793b6ec68c --- /dev/null +++ b/tests/shell/testcases/nft-f/0023check_1 @@ -0,0 +1,12 @@ +#!/bin/bash + +RULESET="table ip foo { + chain bar { + type filter hook prerouting priority 0; + } +}" + +$NFT -f - <<< "$RULESET" + +$NFT -c add rule foo bar fib saddr . oif type local && exit 1 +exit 0 -- 2.20.1