2008-03-12 Dan Williams <dcbw@redhat.com>

* libnm-util/nm-setting-ip4-config.c
	  libnm-util/nm-setting-ip4-config.h
		- Remove 'manual' and 'autoip' properties
		- Add 'method' property
		- (verify): fix verification with 'method'
		- (finalize): free 'method'
		- (set_property, get_property, nm_setting_ip4_config_class_init): fix
			up for 'method'

	* src/nm-device.c
		- (real_act_stage3_ip_config_start): check IP4Config method
		- (nm_device_new_ip4_autoip_config): add a note about not sucking in
			the future
		- (merge_ip4_config): IP settings are valid with DHCP too
		- (real_act_stage4_get_ip4_config): handle all IP4Config methods
		- (real_act_stage4_ip_config_timeout): don't do autoip on DHCP timeout

	* src/nm-device-802-11-wireless.c
		- (real_act_stage3_ip_config_start): remove; autoip only on demand
		- (real_act_stage4_get_ip4_config): just chain up to parent; autoip
			only on demand

	* system-settings/plugins/ifcfg-fedora/parser.c
	  system-settings/plugins/ifcfg-suse/parser.c
		- (make_ip4_setting): fix up for 'method'



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3443 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-03-13 03:11:02 +00:00
parent d5efb7be6d
commit 1cfb4db69f
7 changed files with 132 additions and 129 deletions

View File

@@ -155,14 +155,14 @@ make_ip4_setting (shvarFile *ifcfg, GError **error)
NMSettingIP4Config *s_ip4 = NULL;
char *value = NULL;
NMSettingIP4Address tmp = { 0, 0, 0 };
gboolean manual = TRUE;
char *method = NM_SETTING_IP4_CONFIG_METHOD_MANUAL;
value = svGetValue (ifcfg, "BOOTPROTO");
if (!value)
return NULL;
if (!g_ascii_strcasecmp (value, "bootp") || !g_ascii_strcasecmp (value, "dhcp")) {
manual = FALSE;
method = NM_SETTING_IP4_CONFIG_METHOD_DHCP;
return NULL;
}
@@ -212,7 +212,7 @@ make_ip4_setting (shvarFile *ifcfg, GError **error)
}
s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
s_ip4->manual = manual;
s_ip4->method = g_strdup (method);
if (tmp.address || tmp.netmask || tmp.gateway) {
NMSettingIP4Address *addr;
addr = g_new0 (NMSettingIP4Address, 1);