diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-04-23 03:33:58 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-04-23 03:33:58 +0200 |
commit | e93c38c3a2daaa2a8fedac59037f43a0403fdd03 (patch) | |
tree | 52561378e6c93a5a72e5c8ae53392e025b43f46d /udev/lib/libudev-monitor.c | |
parent | dacea9ff6be55f1b115c13b1ab530812d0d66879 (diff) |
libudev: monitor - do not filter messages with wrong magic
Diffstat (limited to 'udev/lib/libudev-monitor.c')
-rw-r--r-- | udev/lib/libudev-monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index d8b375c713..211aa12f62 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -241,8 +241,8 @@ static int filter_apply(struct udev_monitor *udev_monitor) bpf_stmt(ins, &i, BPF_LD|BPF_W|BPF_ABS, offsetof(struct udev_monitor_netlink_header, magic)); /* jump if magic matches */ bpf_jmp(ins, &i, BPF_JMP|BPF_JEQ|BPF_K, UDEV_MONITOR_MAGIC, 1, 0); - /* wrong magic, drop packet */ - bpf_stmt(ins, &i, BPF_RET|BPF_K, 0); + /* wrong magic, pass packet */ + bpf_stmt(ins, &i, BPF_RET|BPF_K, 0xffffffff); /* add all subsystem match values */ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_monitor->filter_subsystem_list)) { |