diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-11-01 20:14:13 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org> | 2005-11-01 20:14:13 +0000 |
commit | c08c0ed43a565d192707dbc3ae6ffc895bb6b3f9 (patch) | |
tree | e7fcf6cb8183a26303408cb6a465b374b4515984 /src | |
parent | 37a8ec0ef4bf890ed4fade4f09c326f2daa7b07d (diff) | |
download | conntrack-tools-c08c0ed43a565d192707dbc3ae6ffc895bb6b3f9.tar.gz conntrack-tools-c08c0ed43a565d192707dbc3ae6ffc895bb6b3f9.zip |
o Fix --id parameter parsing
Diffstat (limited to 'src')
-rw-r--r-- | src/conntrack.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/conntrack.c b/src/conntrack.c index fcd0ce4..0823de1 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -860,11 +860,19 @@ int main(int argc, char *argv[]) case 'm': mark = atol(optarg); break; - case 'i': + case 'i': { + char *s = NULL; options |= CT_OPT_ID; if (optarg) - id = atol(optarg); + break; + else if (optind < argc && argv[optind][0] != '-' + && argv[optind][0] != '!') + s = argv[optind++]; + + if (s) + id = atol(s); break; + } default: if (h && h->parse_opts &&!h->parse_opts(c - h->option_offset, argv, &orig, |