[lib] more selective mask to catch uevent from netlink
authorChristophe Varoqui <christophe.varoqui@free.fr>
Wed, 15 Apr 2009 19:47:01 +0000 (21:47 +0200)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Wed, 15 Apr 2009 19:47:01 +0000 (21:47 +0200)
Kay Sievers reports 0x01 is the only group used by the kernel.
As udev will start using other groups, pollution will result from
our lack of filtering.

libmultipath/uevent.c

index 99757fe..e18ec25 100644 (file)
@@ -165,7 +165,7 @@ int uevent_listen(int (*uev_trigger)(struct uevent *, void * trigger_data),
                memset(&snl, 0x00, sizeof(struct sockaddr_nl));
                snl.nl_family = AF_NETLINK;
                snl.nl_pid = getpid();
-               snl.nl_groups = 0xffffffff;
+               snl.nl_groups = 0x01;
 
                sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT);
                if (sock == -1) {