Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1402820imm; Sun, 27 May 2018 06:10:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZooYYOPRuImigUJuUsmTiFCM9LL2xaqEk2qJo0h51oiz4Tg/JgcwA12aBrSvwn604Ay/Dn8 X-Received: by 2002:a63:ba56:: with SMTP id l22-v6mr7404207pgu.161.1527426607627; Sun, 27 May 2018 06:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527426607; cv=none; d=google.com; s=arc-20160816; b=x+w9AcOIOtv2laXL7rlYGi82d7f+MwGQ2ucRwD3DVE8bUV74qkmADlQKUicf89nhxr JO+AR6JKahP0F0bWHTd3YDsuKo2bPuJwNy15GCIM4nS8zTu+XUQWfeZbx210jXFlXUjA SSQFOHqI6zvGIR0s0GkLdgdKdKE5fdUvCddaiB1NVFAhI4tcEl0xGK08erJTXOJX9ok8 M2Qb3gidyOaKEZ48LDF/eWuaXwHw02x5uHk05FVbV4yN7RSyaxEDy9nt6/bOOSeKPxfG G2QINgX572tbGBsJPbFq49fb+6Ojkf4BtOLd6EaovpswpRr/48wy3SpiaBREBxLaAtlf dg9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=ESarLx91NIf+fWlr+dOGRwjflac21qSWxHg10lolUZA=; b=AW7L5P9QyR2eetZMDmp9q3W7rOFwP82Fv1IQRgAriWcfmUHwFEVZKt346OhGkz5RWd iewNZ0gST8TbyIbVqN6HtGxMigjmryBrTFVe5poeKuKOIeU+8dL0cNEexYcLhodr31BW c72QECIvXML0YoJyz3vRnncYZV1/wtzVuO7lxqx4yZr9fv9Rfpa2eTYWXYDxE5eed1l+ gLHnu4UKRpNI0q8isXr/SJY7YNs+b6/GKmyl9D3wumhr/0Ibijn9BaRLO3Lw/1rXP/kb UkcePodQkCG68UXBDZwsyGy2W4zOj+k88GIYBWFFzlwtv+Z574EdIWKydgL1YomANeWa UDvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CBbOnnHi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12-v6si27488451pld.367.2018.05.27.06.09.22; Sun, 27 May 2018 06:10:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CBbOnnHi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936418AbeE0NJK (ORCPT + 99 others); Sun, 27 May 2018 09:09:10 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:46982 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936343AbeE0NJI (ORCPT ); Sun, 27 May 2018 09:09:08 -0400 Received: by mail-pl0-f65.google.com with SMTP id 30-v6so5681156pld.13; Sun, 27 May 2018 06:09:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=ESarLx91NIf+fWlr+dOGRwjflac21qSWxHg10lolUZA=; b=CBbOnnHiQF/t+yIUSQIcA1VQnU5JdjOvv2RyenuzeVCY+I6zj9qTOAK5pSSGWQp/oQ OLSclwUdmvsjKzbr00TJEqzMm0qkQz0mLbyXzw3nC/pvbIs0TJqqhxbBfpapfuoJmKwZ R1xhK0CtmPwum8/G9LUP2a4oMPXPbPGABEgNGs6m8GZ+BShKDmLzfaiSwPsHhAUVzQtw T9f5Kt2jwpn7obLmrE8GHjqcXgS7iEOBqG0AlypwkMoex7l+nI9kXNWFR7UTIdS4U6vx lJU/ATkFsvmZ5u24R7rhj0sX0BxSrHzWSMULl3RfszWw8WPY+YJBGwd3lZQaB7tkGxvN tT9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ESarLx91NIf+fWlr+dOGRwjflac21qSWxHg10lolUZA=; b=Je/77lC3pyXlvDb0m4rngMyv//CrquJzkKMfks1rNQq00LnqqQX9OZyRmL48v0q+9b 5IFE+pnKFG8VnpQTevMQ5RCWVDqYW+7OP0YmOQUltSTsJHKd8/YnB1gOgCZobBmwE8cX BjkpgbYualrmYoaoRzW/dLXB4/PSfpP+SQLaMb6xB9skUYNqwyz+HxP+fsP+ChsgdKc7 iCOympNyL9ZaQH2WM/zR8U4LSE4dK6WznokiQM8+nSjbC/PTwdHHsI+ke4VlfBctg903 po1IFbkw9h4vH6ovaIPDMUVlU2IPS9ah5Xzv1rtD8GX76GL1r7AmQKPZ2+8NG5+ilH8/ 4JBw== X-Gm-Message-State: ALKqPwcak1N6HDPPBrSEdvyNfHkGw9M2MTlqCfzaYbRw6xXggLfRlpyl 3Xgnsgyaybh59hJ+CJmqlLc1Zg== X-Received: by 2002:a17:902:4464:: with SMTP id k91-v6mr9706024pld.219.1527426547131; Sun, 27 May 2018 06:09:07 -0700 (PDT) Received: from seema-Inspiron-15-3567 ([2409:4071:218e:5c62:80a6:b994:6ec9:2fe4]) by smtp.gmail.com with ESMTPSA id u9-v6sm65238046pfj.10.2018.05.27.06.09.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 May 2018 06:09:06 -0700 (PDT) Date: Sun, 27 May 2018 18:39:01 +0530 From: Arushi Singhal To: pablo@netfilter.org Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iptables-compat: homogenize error message Message-ID: <20180527130901.GA18320@seema-Inspiron-15-3567> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a difference between error messages in iptables and iptables-compat: #sudo iptables-compat -D INPUT 4 iptables: No chain/target/match by that name. #sudo iptables -D INPUT 4 iptables: Index of deletion too big. Now, will show same error message. Signed-off-by: Arushi Singhal --- iptables/nft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptables/nft.c b/iptables/nft.c index e33d00f..40646f4 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -2603,7 +2603,7 @@ const char *nft_strerror(int err) { nft_rule_add, E2BIG, "Index of insertion too big" }, { nft_rule_check, ENOENT, "Bad rule (does a matching rule exist in that chain?)" }, { nft_rule_replace, ENOENT, "Index of replacement too big" }, - { nft_rule_delete_num, E2BIG, "Index of deletion too big" }, + { nft_rule_delete_num, ENOENT, "Index of deletion too big" }, /* { TC_READ_COUNTER, E2BIG, "Index of counter too big" }, { TC_ZERO_COUNTER, E2BIG, "Index of counter too big" }, */ { nft_rule_add, ELOOP, "Loop found in table" }, -- 2.7.4