diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-28 00:45:05 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-28 00:45:05 +0100 |
commit | a81b65aee06b864772647d9ec0ee09fdaccf2889 (patch) | |
tree | 03d10fa8f0734d6ffee9f31e74e2fdc472475922 /src/conntrack.c | |
parent | 43ba03341b176cb71502df0ac7b979447b98fad9 (diff) | |
download | conntrack-tools-a81b65aee06b864772647d9ec0ee09fdaccf2889.tar.gz conntrack-tools-a81b65aee06b864772647d9ec0ee09fdaccf2889.zip |
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 <pablo@netfilter.org>
Diffstat (limited to 'src/conntrack.c')
-rw-r--r-- | src/conntrack.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |