[conntrack-tools] conntrack: fix output when no arguments are passed

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Wed Oct 7 15:11:02 CEST 2009


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=0cd2397e80d21d77ddb97794f24bb6945849093d
commit 0cd2397e80d21d77ddb97794f24bb6945849093d
Author:     Hannes Eder <heder at google.com>
AuthorDate: Wed Oct 7 15:08:35 2009 +0200
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Wed Oct 7 15:08:35 2009 +0200

    conntrack: fix output when no arguments are passed
    
    When 'conntrack' is called with no arguments then garbage is printed
    after the usage message.  This patch fixes this.
    
    Signed-off-by: Hannes Eder <heder at google.com>
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
       via  0cd2397e80d21d77ddb97794f24bb6945849093d (commit)
      from  bde8891c60cd31590b38459081886bb5d1910f97 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0cd2397e80d21d77ddb97794f24bb6945849093d
Author: Hannes Eder <heder at google.com>
Date:   Wed Oct 7 15:08:35 2009 +0200

    conntrack: fix output when no arguments are passed
    
    When 'conntrack' is called with no arguments then garbage is printed
    after the usage message.  This patch fixes this.
    
    Signed-off-by: Hannes Eder <heder at google.com>
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

-----------------------------------------------------------------------

 src/conntrack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
When 'conntrack' is called with no arguments then garbage is printed
after the usage message.  This patch fixes this.

Signed-off-by: Hannes Eder <heder at google.com>
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

diff --git a/src/conntrack.c b/src/conntrack.c
index 42b5133..0053a28 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1493,7 +1493,7 @@ int main(int argc, char *argv[])
 
 	free_options();
 
-	if (exit_msg[cmd][0]) {
+	if (command && exit_msg[cmd][0]) {
 		fprintf(stderr, "%s v%s (conntrack-tools): ",PROGNAME,VERSION);
 		fprintf(stderr, exit_msg[cmd], counter);
 		if (counter == 0 && !(command & (CT_LIST | EXP_LIST)))



More information about the netfilter-cvslog mailing list