Both BPF filter and action will allow users to specify run
multiple times, and only the last one will be considered by
the kernel. Explicitly refuse such command lines.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
while (argc > 0) {
if (matches(*argv, "run") == 0) {
NEXT_ARG();
+
+ if (seen_run)
+ duparg("run", *argv);
opt_bpf:
seen_run = true;
cfg.type = bpf_type;
while (argc > 0) {
if (matches(*argv, "run") == 0) {
NEXT_ARG();
+
+ if (seen_run)
+ duparg("run", *argv);
opt_bpf:
seen_run = true;
cfg.type = bpf_type;