mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 12:34:55 +00:00
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 git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3882 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
ad5ae13d63
commit
0d85411ed4
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
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
|
||||
|
||||
2008-07-31 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* src/nm-activation-request.c
|
||||
|
|
|
@ -112,7 +112,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
|
|||
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 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
|
|||
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,
|
||||
|
|
|
@ -62,10 +62,10 @@ GQuark nm_setting_ip4_config_error_quark (void);
|
|||
#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 */
|
||||
|
|
|
@ -149,7 +149,7 @@ update_routing_and_dns (NMPolicy *policy, gboolean force_update)
|
|||
|
||||
/* 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 */
|
||||
|
|
|
@ -649,7 +649,7 @@ nm_device_handle_autoip4_event (NMDevice *self,
|
|||
|
||||
/* 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 @@ real_act_stage3_ip_config_start (NMDevice *self, NMDeviceStateReason *reason)
|
|||
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 @@ real_act_stage3_ip_config_start (NMDevice *self, NMDeviceStateReason *reason)
|
|||
*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 @@ real_act_stage4_get_ip4_config (NMDevice *self,
|
|||
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 ();
|
||||
|
|
|
@ -169,12 +169,12 @@ make_ip4_setting (shvarFile *ifcfg, GError **error)
|
|||
|
||||
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 @@ make_ip4_setting (shvarFile *ifcfg, GError **error)
|
|||
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);
|
||||
|
|
|
@ -108,11 +108,11 @@ make_ip4_setting (shvarFile *ifcfg)
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue