2008-10-08 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerSystem.c
		- (find_route): ref the route so it doesn't get destroyed when the cache
			is cleared
		- (nm_system_device_set_priority): unref the route here after it's done
			being used



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4156 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-10-08 19:45:52 +00:00
parent 9068f0b6c1
commit b339761a91
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2008-10-08 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.c
- (find_route): ref the route so it doesn't get destroyed when the cache
is cleared
- (nm_system_device_set_priority): unref the route here after it's done
being used
2008-10-08 Dan Williams <dcbw@redhat.com>
* src/nm-serial-device.c

View file

@ -796,6 +796,8 @@ find_route (struct nl_object *object, gpointer user_data)
if (addr->prefix == nl_addr_get_prefixlen (dst) &&
(addr->address & nm_utils_ip4_prefix_to_netmask (addr->prefix)) == dst_addr->s_addr) {
/* Ref the route so it sticks around after the cache is cleared */
rtnl_route_put (route);
info->route = route;
break;
}
@ -823,5 +825,6 @@ nm_system_device_set_priority (const char *iface,
rtnl_route_set_prio (info.route, priority);
rtnl_route_add (nlh, info.route, 0);
rtnl_route_put (info.route);
}
}