From patchwork Wed Mar 22 02:07:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishwanath Pai X-Patchwork-Id: 741828 X-Patchwork-Delegate: kadlec@blackhole.kfki.hu 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 3vntPl3Bxhz9s7g for ; Wed, 22 Mar 2017 13:08:11 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=akamai.com header.i=@akamai.com header.b="Gi74qMqp"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758561AbdCVCH4 (ORCPT ); Tue, 21 Mar 2017 22:07:56 -0400 Received: from prod-mail-xrelay06.akamai.com ([96.6.114.98]:39033 "EHLO prod-mail-xrelay06.akamai.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757455AbdCVCHy (ORCPT ); Tue, 21 Mar 2017 22:07:54 -0400 Received: from prod-mail-xrelay06.akamai.com (localhost.localdomain [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id EAF27496C0E; Wed, 22 Mar 2017 02:07:40 +0000 (GMT) Received: from prod-mail-relay08.akamai.com (prod-mail-relay08.akamai.com [172.27.22.71]) by prod-mail-xrelay06.akamai.com (Postfix) with ESMTP id D4E24496C09; Wed, 22 Mar 2017 02:07:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; s=a1; t=1490148460; bh=yFIq8ci7cIt0F3kagBtc0VzlNJ3mvEH0NDRXxnqIRp8=; l=869; h=From:To:Cc:Date:From; b=Gi74qMqp+7sg7ilg8RxN7JElBKNYp3YRUWdzzzYLYx3XxhtK80k5/sOp7bfkJbN/w AGgZGXdTtNTjijqS9G/XJmjoS7pq8XksnkqjrKm2QI7hnLdcrFBWFHurRRr9ObIjOy djunDAIF7sT3q2rQ3rdS7/CzZEmH3pXeGSfqu1CM= Received: from bos-lpqrs.kendall.corp.akamai.com (bos-lpqrs.kendall.corp.akamai.com [172.28.13.81]) by prod-mail-relay08.akamai.com (Postfix) with ESMTP id C243298084; Wed, 22 Mar 2017 02:07:40 +0000 (GMT) Received: from vpai by bos-lpqrs.kendall.corp.akamai.com with local (Exim 4.82) (envelope-from ) id 1cqVga-0000kB-JF; Tue, 21 Mar 2017 22:07:40 -0400 From: Vishwanath Pai To: pablo@netfilter.org, kadlec@blackhole.kfki.hu Cc: johunt@akamai.com, vpai@akamai.com, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, coreteam@netfilter.org, pai.vishwain@gmail.com Subject: [PATCH] netfilter: ipset: print out warnings generated by commands Date: Tue, 21 Mar 2017 22:07:26 -0400 Message-Id: <1490148446-2812-1-git-send-email-vpai@akamai.com> X-Mailer: git-send-email 1.9.1 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Warnings are only printed out for IPSET_CMD_TEST. The user won't see warnings from other commands. Reviewed-by: Josh Hunt Signed-off-by: Vishwanath Pai --- src/ipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipset.c b/src/ipset.c index 2c4fa10..b0bef7b 100644 --- a/src/ipset.c +++ b/src/ipset.c @@ -812,8 +812,8 @@ parse_commandline(int argc, char *argv[]) "Unknown argument %s", argv[1]); ret = ipset_cmd(session, cmd, restore_line); D("ret %d", ret); - /* Special case for TEST and non-quiet mode */ - if (cmd == IPSET_CMD_TEST && ipset_session_warning(session)) { + + if (ipset_session_warning(session)) { if (!ipset_envopt_test(session, IPSET_ENV_QUIET)) fprintf(stderr, "%s", ipset_session_warning(session)); ipset_session_report_reset(session);