From patchwork Sun May 27 13:09:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arushi Singhal X-Patchwork-Id: 921096 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CBbOnnHi"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40v0gh639Zz9s1p for ; Sun, 27 May 2018 23:09:20 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936414AbeE0NJJ (ORCPT ); Sun, 27 May 2018 09:09:09 -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-Google-Smtp-Source: AB8JxZqFu+DRxn3i0463z1qSjEJkfnqAN5ZrGL+i1i3q/gkQHWbMpMK2NHjKidJYd/JKkLBLhYehbg== 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-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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" },