NetworkManager r4234 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4234 - in trunk: . src
- Date: Thu, 30 Oct 2008 04:31:30 +0000 (UTC)
Author: dcbw
Date: Thu Oct 30 04:31:29 2008
New Revision: 4234
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4234&view=rev
Log:
2008-10-30 Dan Williams <dcbw redhat com>
Patch from Alexander Sack <asac canonical com>
Fix "ppp connections don't honour ip4 connection settings"
* src/nm-device-ethernet.c
- (real_act_stage4_get_ip4_config): merge ip4config settings
with results from ppp manager
* src/nm-serial-device.c
- (real_act_stage4_get_ip4_config): merge ip4config settings
with results from ppp manager
Modified:
trunk/ChangeLog
trunk/src/nm-device-ethernet.c
trunk/src/nm-serial-device.c
Modified: trunk/src/nm-device-ethernet.c
==============================================================================
--- trunk/src/nm-device-ethernet.c (original)
+++ trunk/src/nm-device-ethernet.c Thu Oct 30 04:31:29 2008
@@ -1333,6 +1333,7 @@
g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
+ g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
if (!priv->ppp_manager) {
/* Regular ethernet connection. */
@@ -1356,9 +1357,17 @@
nm_ip4_config_set_mtu (*config, mtu);
}
} else {
+ NMConnection *connection;
+ NMSettingIP4Config *s_ip4;
+
+ connection = nm_act_request_get_connection (nm_device_get_act_request (device));
+ g_assert (connection);
+ s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+
/* PPPoE */
*config = priv->pending_ip4_config;
priv->pending_ip4_config = NULL;
+ nm_utils_merge_ip4_config (*config, s_ip4);
ret = NM_ACT_STAGE_RETURN_SUCCESS;
}
Modified: trunk/src/nm-serial-device.c
==============================================================================
--- trunk/src/nm-serial-device.c (original)
+++ trunk/src/nm-serial-device.c Thu Oct 30 04:31:29 2008
@@ -21,6 +21,7 @@
#include "nm-marshal.h"
#include "nm-utils.h"
#include "nm-serial-device-glue.h"
+#include "NetworkManagerUtils.h"
static gboolean serial_debug = FALSE;
@@ -1057,9 +1058,21 @@
NMDeviceStateReason *reason)
{
NMSerialDevicePrivate *priv = NM_SERIAL_DEVICE_GET_PRIVATE (device);
+ NMConnection *connection;
+ NMSettingIP4Config *s_ip4;
+
+ g_return_val_if_fail (config != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+ g_return_val_if_fail (*config == NULL, NM_ACT_STAGE_RETURN_FAILURE);
+ g_return_val_if_fail (reason != NULL, NM_ACT_STAGE_RETURN_FAILURE);
+
+ connection = nm_act_request_get_connection (nm_device_get_act_request (device));
+ g_assert (connection);
+
+ s_ip4 = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
*config = priv->pending_ip4_config;
priv->pending_ip4_config = NULL;
+ nm_utils_merge_ip4_config (*config, s_ip4);
return NM_ACT_STAGE_RETURN_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]