2008-09-30 Tambet Ingo <tambet@gmail.com>

* src/nm-device.c (nm_device_get_priority): Implement.
	(nm_device_set_ip4_config): Send the device priority to system ip4
	config setter.

	* src/NetworkManagerSystem.c (nm_system_device_set_from_ip4_config):
	Add priority argument and if it's >= 0, set the priority of the network
	route added automatically by netlink (or kernel?).
	(nm_system_device_set_priority): Implement.

	* src/NetworkManagerPolicy.c (get_best_device): Use
	nm_device_get_priority() instead of home-grown version. Revert the
	meaning, best priority is the lowest one.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4125 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Tambet Ingo
2008-09-30 15:04:10 +00:00
parent 11f71598b7
commit 50f3ec27a2
6 changed files with 123 additions and 41 deletions

View File

@@ -46,7 +46,8 @@ void nm_system_enable_loopback (void);
void nm_system_update_dns (void);
gboolean nm_system_device_set_from_ip4_config (const char *iface,
NMIP4Config *config);
NMIP4Config *config,
int priority);
gboolean nm_system_vpn_device_set_from_ip4_config (NMDevice *active_device,
const char *iface,