mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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:
parent
cade4d6f19
commit
243b264fca
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user