NetworkManager r3882 - in trunk: . libnm-util src system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-suse
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3882 - in trunk: . libnm-util src system-settings/plugins/ifcfg-fedora system-settings/plugins/ifcfg-suse
- Date: Fri, 1 Aug 2008 14:27:47 +0000 (UTC)
Author: dcbw
Date: Fri Aug 1 14:27:47 2008
New Revision: 3882
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3882&view=rev
Log:
2008-08-01 Dan Williams <dcbw redhat com>
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Make IPv4 methods reflect their usage; 'dhcp' -> 'auto' and
'autoip' -> 'link-local'. VPN & PPP connections can also have IPv4
settings, and they don't necessarily use DHCP.
* src/NetworkManagerPolicy.c
src/nm-device.c
system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-suse/parser.c
- Fixup for method changes
Modified:
trunk/ChangeLog
trunk/libnm-util/nm-setting-ip4-config.c
trunk/libnm-util/nm-setting-ip4-config.h
trunk/src/NetworkManagerPolicy.c
trunk/src/nm-device.c
trunk/system-settings/plugins/ifcfg-fedora/reader.c
trunk/system-settings/plugins/ifcfg-suse/parser.c
Modified: trunk/libnm-util/nm-setting-ip4-config.c
==============================================================================
--- trunk/libnm-util/nm-setting-ip4-config.c (original)
+++ trunk/libnm-util/nm-setting-ip4-config.c Fri Aug 1 14:27:47 2008
@@ -112,7 +112,7 @@
NM_SETTING_IP4_CONFIG_ADDRESSES);
return FALSE;
}
- } else if ( !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)
+ } else if ( !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)
|| !strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
if (self->dns && self->dns->len) {
g_set_error (error,
@@ -137,7 +137,7 @@
NM_SETTING_IP4_CONFIG_ADDRESSES);
return FALSE;
}
- } else if (!strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+ } else if (!strcmp (self->method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
/* nothing to do */
} else {
g_set_error (error,
Modified: trunk/libnm-util/nm-setting-ip4-config.h
==============================================================================
--- trunk/libnm-util/nm-setting-ip4-config.h (original)
+++ trunk/libnm-util/nm-setting-ip4-config.h Fri Aug 1 14:27:47 2008
@@ -62,10 +62,10 @@
#define NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID "dhcp-client-id"
#define NM_SETTING_IP4_CONFIG_DHCP_HOSTNAME "dhcp-hostname"
-#define NM_SETTING_IP4_CONFIG_METHOD_DHCP "dhcp"
-#define NM_SETTING_IP4_CONFIG_METHOD_AUTOIP "autoip"
-#define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual"
-#define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared"
+#define NM_SETTING_IP4_CONFIG_METHOD_AUTO "auto"
+#define NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL "link-local"
+#define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual"
+#define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared"
typedef struct {
guint32 address; /* network byte order */
Modified: trunk/src/NetworkManagerPolicy.c
==============================================================================
--- trunk/src/NetworkManagerPolicy.c (original)
+++ trunk/src/NetworkManagerPolicy.c Fri Aug 1 14:27:47 2008
@@ -149,7 +149,7 @@
/* Never set the default route through an IPv4LL-addressed device */
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP))
+ if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
continue;
/* Make sure at least one of this device's IP addresses has a gateway */
Modified: trunk/src/nm-device.c
==============================================================================
--- trunk/src/nm-device.c (original)
+++ trunk/src/nm-device.c Fri Aug 1 14:27:47 2008
@@ -649,7 +649,7 @@
/* Ignore if the connection isn't an AutoIP connection */
s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
- if (!s_ip4 || !s_ip4->method || strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP))
+ if (!s_ip4 || !s_ip4->method || strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
return;
iface = nm_device_get_iface (self);
@@ -828,7 +828,7 @@
NM_TYPE_SETTING_IP4_CONFIG);
/* If we did not receive IP4 configuration information, default to DHCP */
- if (!s_ip4 || !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+ if (!s_ip4 || !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
gboolean success;
@@ -850,7 +850,7 @@
*reason = NM_DEVICE_STATE_REASON_DHCP_START_FAILED;
ret = NM_ACT_STAGE_RETURN_FAILURE;
}
- } else if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)) {
+ } else if (s_ip4 && !strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
GError *error = NULL;
/* Start avahi-autoipd */
@@ -1026,7 +1026,7 @@
g_assert (s_ip4);
g_assert (s_ip4->method);
- if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_AUTOIP)) {
+ if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL)) {
*config = aipd_get_ip4_config (self, reason);
} else if (!strcmp (s_ip4->method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) {
*config = nm_ip4_config_new ();
Modified: trunk/system-settings/plugins/ifcfg-fedora/reader.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-fedora/reader.c (original)
+++ trunk/system-settings/plugins/ifcfg-fedora/reader.c Fri Aug 1 14:27:47 2008
@@ -169,12 +169,12 @@
value = svGetValue (ifcfg, "BOOTPROTO");
if (value && (!g_ascii_strcasecmp (value, "bootp") || !g_ascii_strcasecmp (value, "dhcp")))
- method = NM_SETTING_IP4_CONFIG_METHOD_DHCP;
+ method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
if (value && !g_ascii_strcasecmp (value, "autoip")) {
g_free (value);
s_ip4 = (NMSettingIP4Config *) nm_setting_ip4_config_new ();
- s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTOIP);
+ s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
return NM_SETTING (s_ip4);
}
@@ -241,7 +241,7 @@
s_ip4->ignore_dhcp_dns = !svTrueValue (ifcfg, "PEERDNS", 1);
/* DHCP hostname for 'send host-name' option */
- if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DHCP)) {
+ if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) {
value = svGetValue (ifcfg, "DHCP_HOSTNAME");
if (value && strlen (value))
s_ip4->dhcp_hostname = g_strdup (value);
Modified: trunk/system-settings/plugins/ifcfg-suse/parser.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-suse/parser.c (original)
+++ trunk/system-settings/plugins/ifcfg-suse/parser.c Fri Aug 1 14:27:47 2008
@@ -108,11 +108,11 @@
str = svGetValue (ifcfg, "BOOTPROTO");
if (str) {
if (!g_ascii_strcasecmp (str, "bootp") || !g_ascii_strcasecmp (str, "dhcp"))
- s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_DHCP);
+ s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTO);
else if (!g_ascii_strcasecmp (str, "static"))
s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_MANUAL);
else if (!g_ascii_strcasecmp (str, "autoip"))
- s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_AUTOIP);
+ s_ip4->method = g_strdup (NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
g_free (str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]