mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user