diff options
-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, |