From b07571735a4acf99295c4b4f75ad5d52daf66ca1 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 23 Jan 2019 14:27:17 +0900 Subject: [PATCH] sd-device-monitor: use SO_DETACH_FILTER to remove BPF program Fixes #11529. --- src/libsystemd/sd-device/device-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c index a6230d382a6..27d0af59183 100644 --- a/src/libsystemd/sd-device/device-monitor.c +++ b/src/libsystemd/sd-device/device-monitor.c @@ -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;