pkt-loop-filter: Unload after interruption in keep running fallback mode

When running in the fallback mode where we keep running in the foreground
to keep the kprobe alive, we should unload the cls_bpf programs after being
interrupted instead of just exiting.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
Toke Høiland-Jørgensen
2022-07-08 14:49:31 +02:00
parent 53a9bbe4c4
commit c833c5ad32

View File

@@ -270,10 +270,9 @@ int main(int argc, char *argv[])
fprintf(stderr, "Couldn't pin bpf_link due to missing kernel support. "
"Will keep running instead to keep probe alive.\n");
err = wait_for_interrupt();
if (err) {
if (err)
fprintf(stderr, "Error waiting for interrupt: %s\n", strerror(-err));
goto unload;
}
goto unload;
}
out: