From a81b65aee06b864772647d9ec0ee09fdaccf2889 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Fri, 28 Nov 2008 00:45:05 +0100 Subject: conntrack: support diminutives for -L With this patch, you can specify the following command to dump the expectation table, instead of writing 'expect'. # conntrack -L e also, it is valid the following command: # conntrack -L ex # conntrack -L exp and so on. Signed-off-by: Pablo Neira Ayuso --- src/conntrack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/conntrack.c b/src/conntrack.c index 9d73631..e165144 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -442,9 +442,9 @@ check_type(int argc, char *argv[]) if (!table) return 0; - if (strncmp("expect", table, 6) == 0) + if (strncmp("expect", table, strlen(table)) == 0) return 1; - else if (strncmp("conntrack", table, 9) == 0) + else if (strncmp("conntrack", table, strlen(table)) == 0) return 0; else exit_error(PARAMETER_PROBLEM, "unknown type `%s'", table); -- cgit v1.2.3