Device names that match "help" or a prefix thereof should be allowed anywhere
a device name can be used. Note that a suitable keyword ("dev" or "name", the
latter for "ip tunnel") has to be used in these cases to resolve ambiguities.
Signed-off-by: Christoph Schulz <develop@kristov.de>
Reported-by: Leonhard Preis <leonhard@pre.is>
Reported-by: Wilhelm Wijkander <lists@0x5e.se>
if (strcmp(*argv, "name") == 0) {
NEXT_ARG();
}
- if (matches(*argv, "help") == 0)
+ else if (matches(*argv, "help") == 0)
usage();
if (p->name[0])
duparg2("name", *argv);
if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
}
- if (matches(*argv, "help") == 0)
+ else if (matches(*argv, "help") == 0)
usage();
if (filter_dev)
duparg2("dev", *argv);
} else {
if (strcmp(*argv, "dev") == 0)
NEXT_ARG();
-
- if (matches(*argv, "help") == 0)
+ else if (matches(*argv, "help") == 0)
usage();
if (dev)
if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
}
- if (matches(*argv, "help") == 0)
+ else if (matches(*argv, "help") == 0)
usage();
if (filter.dev)
duparg2("dev", *argv);