gnetworkmonitornetlink: filter out IPv6 LL MC changes

For some reason, IPv6 link-local multicast routing changes all the
time. GNetworkMonitorBase was already ignoring them for purposes of
emitting network-changed, but GNetworkMonitorNetlink would still
trigger a re-dump after getting one, so network-changed would end up
getting emitted anyway.
This commit is contained in:
Dan Winship 2014-01-28 14:46:37 -05:00
parent cade4d6f19
commit 243b264fca

View File

@ -378,6 +378,16 @@ read_netlink_messages (GSocket *socket,
if (dest || gateway || oif) if (dest || gateway || oif)
{ {
/* Unless we're processing the results of a dump, ignore
* IPv6 link-local multicast routes, which are added and
* removed all the time for some reason.
*/
if (!nl->priv->dump_networks &&
rtmsg->rtm_family == AF_INET6 &&
rtmsg->rtm_dst_len != 0 &&
IN6_IS_ADDR_MC_LINKLOCAL (dest))
continue;
if (msg->nlmsg_type == RTM_NEWROUTE) if (msg->nlmsg_type == RTM_NEWROUTE)
add_network (nl, rtmsg->rtm_family, rtmsg->rtm_dst_len, dest); add_network (nl, rtmsg->rtm_family, rtmsg->rtm_dst_len, dest);
else else