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

* libnm-glib/nm-ip4-config.c
	  libnm-glib/nm-ip4-config.h
		- Add 'routes' property

	* libnm-util/nm-setting-vpn.c
	  libnm-util/nm-setting-vpn.h
		- Remove 'routes' property

	* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
		- Add 'ignore-auto-routes' property
		- 'routes' exposed over D-Bus is now an array of array of uint (4) to 
			accomodate route metrics
		- 'routes' exposed in C is now a list of NMSettingIP4Route structures

	* libnm-util/nm-utils.c
	  libnm-util/nm-utils.h
		- Add helpers for marshalling IP4 routes

	* src/NetworkManagerUtils.c
		- (nm_utils_merge_ip4_config): handle property renames and new route
			structure

	* src/NetworkManagerSystem.c
		- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
		   nm_system_vpn_device_set_from_ip4_config): respect route metrics

	* src/dhcp-manager/nm-dhcp-manager.c
		- (nm_dhcp_manager_get_ip4_config): handle new route structure

	* system-settings/plugins/ifcfg-fedora/reader.c
	  system-settings/plugins/ifcfg-fedora/writer.c
		- Handle routes separately from addresses now that routes have a different
			format

	* introspection/nm-ip4-config.xml
	  src/nm-ip4-config.c
	  src/nm-ip4-config.h
		- Rename internal routing functions
		- 'static-routes' renamed to 'routes'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-08-06 22:23:48 +00:00
parent 2f3820c624
commit 2c31b5499b
19 changed files with 508 additions and 241 deletions

View File

@@ -829,6 +829,7 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
char **s;
for (s = searches; *s; s += 2) {
NMSettingIP4Route *route;
struct in_addr rt_addr;
struct in_addr rt_route;
@@ -843,13 +844,12 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
// FIXME: ensure the IP addresse and route are sane
addr = g_malloc0 (sizeof (NMSettingIP4Address));
addr->address = (guint32) rt_addr.s_addr;
addr->prefix = 32; /* 255.255.255.255 */
addr->gateway = (guint32) rt_route.s_addr;
route = g_malloc0 (sizeof (NMSettingIP4Route));
route->address = (guint32) rt_addr.s_addr;
route->prefix = 32; /* 255.255.255.255 */
route->next_hop = (guint32) rt_route.s_addr;
nm_ip4_config_take_static_route (ip4_config, addr);
addr = NULL;
nm_ip4_config_take_route (ip4_config, route);
nm_info (" static route %s gw %s", *s, *(s + 1));
}
} else {