fix: don't bind RTMGRP_IPV(4|6)_ROUTE

This commit is contained in:
Alex 2019-03-31 16:32:51 +02:00
parent 0ad9a03d3d
commit 7fac483530

View File

@ -56,8 +56,7 @@ void waybar::modules::Network::createInfoSocket()
throw std::runtime_error("Can't connect network socket");
}
sa.nl_family = AF_NETLINK;
sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV4_ROUTE
| RTMGRP_IPV6_IFADDR | RTMGRP_IPV6_ROUTE;
sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR;
auto ret = bind(info_sock_, (struct sockaddr *)&sa, sizeof(sa));
if (ret < 0) {
throw std::runtime_error("Can't add membership");