summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-01-30 21:56:34 +0100
committerThomas Haller <thaller@redhat.com>2015-01-30 22:04:10 +0100
commitb3944cfc712564ebd03e1b88e12cba205c71914c (patch)
treec9f8bd820de636758746063d519b6d63c4a785b6
parent6be3d7cbadab0b03265fdf85f6e764c2c5d45241 (diff)
downloadNetworkManager-b3944cfc712564ebd03e1b88e12cba205c71914c.tar.gz
manager: fix impl_manager_add_and_activate_connection()
Note also the comment "Just make sure we don't expect specific data being in the connection till then (especially in validate_activation_request())." in impl_manager_add_and_activate_connection(). Creating a connection caused a failed assertion: #0 0x00007ff8da3aa4e9 in g_logv (log_domain=0x7ff8ddf41036 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffff5a0a090) at gmessages.c:989 #1 0x00007ff8da3aa63f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025 #2 0x00007ff8dde8c47a in nm_utils_get_ip_config_method (connection=0x7ff8def21d20, ip_setting_type=140706868598912) at NetworkManagerUtils.c:1252 #3 0x00007ff8dde7d654 in validate_activation_request (self=0x7ff8def62150, context=0x7ff8deff5a00, connection=0x7ff8def21d20, device_path=0x7ff8def3f770 "/org/freedesktop/NetworkManager/Devices/2", out_device=0x7ffff5a0a370, out_vpn=0x7ffff5a0a36c, error=0x7ffff5a0a378) at nm-manager.c:3061 #4 0x00007ff8dde7b7a2 in impl_manager_add_and_activate_connection (self=0x7ff8def62150, settings=0x7ff8def95460, device_path=0x7ff8def3f770 "/org/freedesktop/NetworkManager/Devices/2", specific_object_path=0x7ff8deeeced0 "/org/freedesktop/NetworkManager/AccessPoint/227", context=0x7ff8deff5a00) at nm-manager.c:3386 #5 0x00007ff8dde6bd9c in dbus_glib_marshal_nm_manager_VOID__BOXED_BOXED_BOXED_POINTER (closure=0x7ffff5a0a5f0, return_value=0x0, n_param_values=5, param_values=0x7ff8defb9d30, invocation_hint=0x0, marshal_data=0x7ff8dde7b660 <impl_manager_add_and_activate_connection>) at ./nm-manager-glue.h:189 #6 0x00007ff8dc506885 in invoke_object_method (message=0x7ff8def99a00, connection=0x7ff8deeec940, method=0x7ff8de1a6878 <dbus_glib_nm_manager_methods+72>, object_info=0x7ff8de1a2e70 <dbus_glib_nm_manager_object_info>, object=0x7ff8def62150) at dbus-gobject.c:1899 #7 object_registration_message (connection=0x7ff8deeec940, message=message@entry=0x7ff8def99a00, user_data=user_data@entry=0x7ff8def16da0) at dbus-gobject.c:2161 #8 0x00007ff8dc2cef86 in _dbus_object_tree_dispatch_and_unlock (tree=0x7ff8deeec5e0, message=message@entry=0x7ff8def99a00, found_object=found_object@entry=0x7ffff5a0a814) at dbus-object-tree.c:862 #9 0x00007ff8dc2c10d9 in dbus_connection_dispatch (connection=connection@entry=0x7ff8deeec940) at dbus-connection.c:4699 #10 0x00007ff8dc503d65 in message_queue_dispatch (source=source@entry=0x7ff8deeee720, callback=<optimized out>, user_data=<optimized out>) at dbus-gmain.c:90 #11 0x00007ff8da3a32a6 in g_main_dispatch (context=0x7ff8deebd320) at gmain.c:3066 #12 g_main_context_dispatch (context=context@entry=0x7ff8deebd320) at gmain.c:3642 #13 0x00007ff8da3a3628 in g_main_context_iterate (context=0x7ff8deebd320, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713 #14 0x00007ff8da3a3a3a in g_main_loop_run (loop=0x7ff8deebd3e0) at gmain.c:3907 #15 0x00007ff8dddc0979 in main (argc=1, argv=0x7ffff5a0afd8) at main.c:442 Fixes: 477033b9eff9a6ba168805eafe68272c62cb1cb4
-rw-r--r--src/nm-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c
index 7fef779ccc..30782a1bb4 100644
--- a/src/nm-manager.c
+++ b/src/nm-manager.c
@@ -3058,8 +3058,10 @@ validate_activation_request (NMManager *self,
}
/* Not implemented yet, we want to fail early */
- if (strcmp (nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG),
- NM_SETTING_IP6_CONFIG_METHOD_SHARED) == 0) {
+ if ( nm_connection_get_setting_connection (connection)
+ && nm_connection_get_setting_ip6_config (connection)
+ && !strcmp (nm_utils_get_ip_config_method (connection, NM_TYPE_SETTING_IP6_CONFIG),
+ NM_SETTING_IP6_CONFIG_METHOD_SHARED)) {
g_set_error_literal (error,
NM_MANAGER_ERROR,
NM_MANAGER_ERROR_CONNECTION_NOT_AVAILABLE,