2008-10-26 Dan Williams <dcbw@redhat.com>

Patch from Tambet Ingo <tambet@gmail.com>

	* libnm-util/libnm-util.ver
	  libnm-util/nm-setting-wired.c
	  libnm-util/nm-setting-wired.h
		- Make properties private and add accessor functions

	* src/nm-device-ethernet.c
	  system-settings/plugins/ifcfg-fedora/nm-ifcfg-connection.c
	  system-settings/plugins/ifcfg-suse/parser.c
	  system-settings/src/main.c
		- Use those accessors



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4215 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-10-26 17:02:05 +00:00
parent 3949779389
commit fff2e85bd6
8 changed files with 141 additions and 47 deletions

View File

@@ -570,8 +570,10 @@ real_get_best_auto_connection (NMDevice *dev,
continue;
if (s_wired) {
if ( s_wired->mac_address
&& memcmp (s_wired->mac_address->data, priv->hw_addr.ether_addr_octet, ETH_ALEN))
const GByteArray *mac;
mac = nm_setting_wired_get_mac_address (s_wired);
if (mac && memcmp (mac->data, priv->hw_addr.ether_addr_octet, ETH_ALEN))
continue;
}
@@ -1326,6 +1328,7 @@ real_act_stage4_get_ip4_config (NMDevice *device,
if (ret == NM_ACT_STAGE_RETURN_SUCCESS) {
NMConnection *connection;
NMSettingWired *s_wired;
guint32 mtu;
connection = nm_act_request_get_connection (nm_device_get_act_request (device));
g_assert (connection);
@@ -1333,8 +1336,9 @@ real_act_stage4_get_ip4_config (NMDevice *device,
g_assert (s_wired);
/* MTU override */
if (s_wired->mtu)
nm_ip4_config_set_mtu (*config, s_wired->mtu);
mtu = nm_setting_wired_get_mtu (s_wired);
if (mtu)
nm_ip4_config_set_mtu (*config, mtu);
}
} else {
/* PPPoE */
@@ -1401,8 +1405,10 @@ real_check_connection_compatible (NMDevice *device,
}
if (s_wired) {
if ( s_wired->mac_address
&& memcmp (s_wired->mac_address->data, &(priv->hw_addr.ether_addr_octet), ETH_ALEN)) {
const GByteArray *mac;
mac = nm_setting_wired_get_mac_address (s_wired);
if (mac && memcmp (mac->data, &(priv->hw_addr.ether_addr_octet), ETH_ALEN)) {
g_set_error (error,
NM_ETHERNET_ERROR, NM_ETHERNET_ERROR_CONNECTION_INCOMPATIBLE,
"The connection's MAC address did not match this device.");