mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 09:21:26 +03:00
sd-device-monitor: use SO_DETACH_FILTER to remove BPF program
Fixes #11529.
This commit is contained in:
parent
49a881e514
commit
b07571735a
@ -748,7 +748,7 @@ _public_ int sd_device_monitor_filter_remove(sd_device_monitor *m) {
|
||||
m->subsystem_filter = hashmap_free_free_free(m->subsystem_filter);
|
||||
m->tag_filter = set_free_free(m->tag_filter);
|
||||
|
||||
if (setsockopt(m->sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)) < 0)
|
||||
if (setsockopt(m->sock, SOL_SOCKET, SO_DETACH_FILTER, &filter, sizeof(filter)) < 0)
|
||||
return -errno;
|
||||
|
||||
m->filter_uptodate = true;
|
||||
|
Loading…
Reference in New Issue
Block a user