From patchwork Thu Apr 7 19:38:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guruswamy Basavaiah X-Patchwork-Id: 607652 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qgtDc65Gwz9t3b for ; Fri, 8 Apr 2016 05:38:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=NYVzHWUv; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932419AbcDGTiT (ORCPT ); Thu, 7 Apr 2016 15:38:19 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:35103 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932078AbcDGTiS (ORCPT ); Thu, 7 Apr 2016 15:38:18 -0400 Received: by mail-pa0-f65.google.com with SMTP id zy2so7465967pac.2 for ; Thu, 07 Apr 2016 12:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=stBKLtMPJIHa/Aastg96AeT8Zx5QG2ohKAbjnC6Vxbk=; b=NYVzHWUvotMy9r7mvXLSTml+pFhs1AN9HX7OHc4pDHYL2udx5rYWn6/dH/ZBN7tWMB ir8WFHfcxcUw4zGIwtXPLm6fug8Ln0eyFvNhTuGJ5/t3ToZCsmR+R+Ln4P8lf6mDWdlg MIhVMSZLxkWkByUj9SqRtoCaqXp5yvQl2raRI+V+1DJ/3uHR3V8tbP2seDKBYBqlACYD oVfMDucnbFowvh0XiNsklXMMwGHPa3DSNXCgTURyW3lfA1sGXlrOE/fnho4smHjLfwWv fNwHcphvaN746ZSGmsxXVnXNU0Z/TC3HuqTjFmDpm7TcTsO0eqnRPVejUW1+Ib0dK2zT yH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=stBKLtMPJIHa/Aastg96AeT8Zx5QG2ohKAbjnC6Vxbk=; b=GWTJYUDdse9jKLdbhjxeV3wjHymELszB29BxaMWZIiZYTk0JoCgJxijyLM2Wod9ls2 dOkDUvDo8W4pb1hAnRcnUHQ5IpA3c1Iu2VazTiPOEn2LjSDz0J/KXEvA9Bg6pGHQugTN HDF6IErfiXox0Ke7vIu9WTH0Amj4/inSa8COXpmOniCihlkGqO+QMH2FrXzqPRnkkn2J ja3ZrZK66CAm/pjQFHlt8xpmKHe1a5Kob7F1bVHe7IRi6taH94UDdzuMjiUwnoGt/C+v fekSJq8bA50km59GJARzrcQiayPt7IKkxk1WiP13N3JKTyoo01qmGHkQ7YF6F5qOPup2 R3pg== X-Gm-Message-State: AD7BkJKj5X0D4VYlqr7+sdu6Mo0dOgm1KyipCx1ZcH/+ZPcSH6dDuikEgQsF/+L4SFBPhw== X-Received: by 10.66.54.78 with SMTP id h14mr6959731pap.95.1460057897785; Thu, 07 Apr 2016 12:38:17 -0700 (PDT) Received: from localhost.localdomain.localdomain ([1.23.8.201]) by smtp.gmail.com with ESMTPSA id f8sm13942112pfj.49.2016.04.07.12.38.16 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Apr 2016 12:38:17 -0700 (PDT) From: Guruswamy Basavaiah To: netfilter-devel@vger.kernel.org Subject: [PATCH] Printing the table name before chain name. Date: Fri, 8 Apr 2016 01:08:14 +0530 Message-Id: <1460057894-20466-1-git-send-email-guru2018@gmail.com> X-Mailer: git-send-email 2.5.5 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Command ./iptables-restore-translate, was printing table name before the chain name for user added chains. This is breaking ./nft -f command. Before fix, output of "./iptables-restore-translate" add chain ip OUTPUT_direct raw After fix: add chain ip raw OUTPUT_direct Signed-off-by: Guruswamy Basavaiah --- iptables/xtables-translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 354357c..0b2c0bf 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -297,7 +297,7 @@ static const struct option options[] = { static int xlate_chain_user_add(struct nft_handle *h, const char *chain, const char *table) { - printf("add chain %s %s %s\n", family2str[h->family], chain, table); + printf("add chain %s %s %s\n", family2str[h->family], table, chain); return 0; }