From patchwork Tue Feb 11 10:46:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Bursztyka X-Patchwork-Id: 319213 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 B9C232C00A2 for ; Tue, 11 Feb 2014 21:47:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750758AbaBKKrF (ORCPT ); Tue, 11 Feb 2014 05:47:05 -0500 Received: from mga11.intel.com ([192.55.52.93]:54423 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751684AbaBKKrD (ORCPT ); Tue, 11 Feb 2014 05:47:03 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 11 Feb 2014 02:47:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,825,1384329600"; d="scan'208";a="473325622" Received: from rd-190.fi.intel.com ([10.237.72.164]) by fmsmga001.fm.intel.com with ESMTP; 11 Feb 2014 02:46:59 -0800 From: Tomasz Bursztyka To: netfilter-devel@vger.kernel.org Cc: Tomasz Bursztyka Subject: [libnftnl PATCH 1/8] chain: Break the line properly when printing out the chain Date: Tue, 11 Feb 2014 12:46:41 +0200 Message-Id: <1392115608-6733-2-git-send-email-tomasz.bursztyka@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392115608-6733-1-git-send-email-tomasz.bursztyka@linux.intel.com> References: <1392115608-6733-1-git-send-email-tomasz.bursztyka@linux.intel.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org As when a rule is printed etc... It fixes a bug in iptables when printing out the chain in debug mode. Signed-off-by: Tomasz Bursztyka --- src/chain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chain.c b/src/chain.c index e26200d..86bd43a 100644 --- a/src/chain.c +++ b/src/chain.c @@ -849,7 +849,7 @@ static int nft_chain_snprintf_default(char *buf, size_t size, if (c->flags & (1 << NFT_CHAIN_ATTR_HOOKNUM)) { ret = snprintf(buf+offset, len, " type %s hook %s prio %d policy %s use %d " - "packets %"PRIu64" bytes %"PRIu64"", + "packets %"PRIu64" bytes %"PRIu64"\n", c->type, nft_hooknum2str(c->family, c->hooknum), c->prio, nft_verdict2str(c->policy), c->use, c->packets, c->bytes);