summaryrefslogtreecommitdiff
path: root/trafgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen.c')
-rw-r--r--trafgen.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/trafgen.c b/trafgen.c
index 9c5a9a6..d2d43bb 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -1097,15 +1097,13 @@ int main(int argc, char **argv)
case 'J':
ctx.jumbo_support = true;
break;
+ case 'c':
case 'i':
confname = xstrdup(optarg);
- if (strstr(confname, ".pcap")) {
+ if (c == 'i' && strstr(confname, ".pcap")) {
ctx.sh.type = SHAPER_TSTAMP;
ctx.pcap_in = confname;
- break;
- }
- case 'c':
- if (!strncmp("-", confname, strlen("-")))
+ } else if (!strncmp("-", confname, strlen("-")))
ctx.cpus = 1;
break;
case 'u':