NetworkManager/src/devices
Thomas Haller 3d6936b2cc core: fix dhcp4_cleanup() to clear dhcp4_client first (avoids assert accessing NM_DEVICE_DHCP4_CONFIG)
dhcp4_cleanup() should first clear @dhcp4_client variables before
clearing @dhcp4_config. Otherwise the following assert fails [1] and
the DBUS property NM_DEVICE_DHCP4_CONFIG is set to %NULL.

Analog to dhcp6_cleanup(), dhcp6_client, and NM_DEVICE_DHCP6_CONFIG.

[1] backtrace:
  #0  0x0000003370c504e9 in g_logv (log_domain=0x4c148c "unrecognized-specs-changed", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff4710ed60) at gmessages.c:989
  #1  0x0000003370c5063f in g_log (log_domain=log_domain@entry=0x4c144c "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x3370cbc89a "%s: assertion '%s' failed") at gmessages.c:1025
  #2  0x0000003370c50679 in g_return_if_fail_warning (log_domain=log_domain@entry=0x4c144c "NetworkManager", pretty_function=pretty_function@entry=0x4c6140 <__PRETTY_FUNCTION__.15969> "nm_dhcp4_config_get_dbus_path",
      expression=expression@entry=0x4c60d9 "NM_IS_DHCP4_CONFIG (self)") at gmessages.c:1034
  #3  0x000000000046b1d4 in nm_dhcp4_config_get_dbus_path (self=0x0) at nm-dhcp4-config.c:115
  #4  0x0000000000434791 in get_property (object=0x9d2320, prop_id=13, value=0x9618a0, pspec=0x9bbc20) at devices/nm-device.c:7539
  #5  0x0000003371c18e73 in object_get_property (value=0x9618a0, pspec=<optimized out>, object=0x9d2320) at gobject.c:1303
  #6  g_object_get_property (object=0x9d2320, property_name=<optimized out>, value=0x9618a0) at gobject.c:2402
  #7  0x000000000048482c in idle_id_reset (data=<optimized out>) at nm-properties-changed-signal.c:123
  #8  0x0000003371c13055 in g_cclosure_marshal_VOID__PARAM (closure=0x9618a0, return_value=0xffffffff, n_param_values=0, param_values=0x7fff4710f130, invocation_hint=0x0, marshal_data=0x4b5201) at gmarshal.c:1037
  #9  0x0000003371c10298 in g_closure_invoke (closure=0x2, closure@entry=0x919d00, return_value=return_value@entry=0x0, n_param_values=1192292656, param_values=0x9d2320, param_values@entry=0x7fff4710f130,
      invocation_hint=invocation_hint@entry=0x7fff4710f0d0) at gclosure.c:777
  #10 0x0000003371c21b87 in signal_emit_unlocked_R (node=node@entry=0x919d90, detail=detail@entry=667, instance=instance@entry=0x9d2320, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fff4710f130) at gsignal.c:3516
  #11 0x0000003371c2a0f2 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff4710f2c0) at gsignal.c:3330
  #12 0x0000003371c2a3af in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3386
  #13 0x0000003371c14945 in g_object_dispatch_properties_changed (object=0x9d2320, n_pspecs=4294967295, pspecs=0x0) at gobject.c:1047
  #14 0x0000003371c17019 in g_object_notify_by_spec_internal (pspec=<optimized out>, object=0x9d2320) at gobject.c:1141
  #15 g_object_notify (object=0x9d2320, property_name=property_name@entry=0x4c400f "dhcp4-config") at gobject.c:1183
  #16 0x0000000000434332 in dhcp4_cleanup (self=self@entry=0x9d2320, stop=stop@entry=1, release=release@entry=0) at devices/nm-device.c:2581
  #17 0x0000000000434cab in _cleanup_generic_pre (self=self@entry=0x9d2320, deconfigure=deconfigure@entry=1) at devices/nm-device.c:6448
  #18 0x0000000000436db1 in nm_device_cleanup (self=self@entry=0x9d2320, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6524
  #19 0x0000000000437358 in _set_state_full (device=device@entry=0x9d2320, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED, quitting=quitting@entry=0) at devices/nm-device.c:6641
  #20 0x000000000043797c in nm_device_state_changed (device=device@entry=0x9d2320, state=state@entry=NM_DEVICE_STATE_UNMANAGED, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6823
  #21 0x0000000000439fe7 in nm_device_set_unmanaged (device=device@entry=0x9d2320, flag=flag@entry=NM_UNMANAGED_INTERNAL, unmanaged=unmanaged@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:5983
  #22 0x000000000043a193 in nm_device_set_unmanaged_quitting (device=0x9d2320) at devices/nm-device.c:5998
  #23 0x00000000004799f9 in remove_device (manager=0x9b2150, device=0x9d2320, quitting=1) at nm-manager.c:775
  #24 0x000000000047bf47 in dispose (object=0x9b2150) at nm-manager.c:4935
  #25 0x0000003371c14ee8 in g_object_unref (_object=0x9b2150) at gobject.c:3160
  #26 0x0000000000429f43 in main (argc=1, argv=0x7fff4710f9a8) at main.c:681

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-23 17:51:51 +02:00
..
adsl core: remove unused 'error' argument to check_connection_compatible() 2014-05-30 13:49:30 -05:00
bluetooth all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
wifi all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
wimax all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
wwan all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-bond.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-bond.h core: move software device creation logic out of NMManager 2013-09-12 18:34:23 -04:00
nm-device-bridge.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-bridge.h core: support slave devices in nm_platform_generate_connection() 2013-11-08 16:46:43 -06:00
nm-device-ethernet.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-ethernet.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-factory.c devices: simplify plugin type checking 2014-05-13 13:50:25 -05:00
nm-device-factory.h devices: simplify plugin type checking 2014-05-13 13:50:25 -05:00
nm-device-generic.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-generic.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-gre.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-gre.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-infiniband.c core: remove unused 'error' argument to check_connection_compatible() 2014-05-30 13:49:30 -05:00
nm-device-infiniband.h core: move software device creation logic out of NMManager 2013-09-12 18:34:23 -04:00
nm-device-macvlan.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-macvlan.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-private.h core: re-attempt connection assumption when the device state changes 2014-06-06 10:11:19 -04:00
nm-device-team.c team: start teamd when ensuring team connection else teamdctl_connect() fails 2014-06-23 15:20:27 +02:00
nm-device-team.h core: support slave devices in nm_platform_generate_connection() 2013-11-08 16:46:43 -06:00
nm-device-tun.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-tun.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-veth.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-veth.h devices: make constructors take an NMPlatformLink 2013-06-05 17:49:25 -03:00
nm-device-vlan.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-vlan.h core: move software device creation logic out of NMManager 2013-09-12 18:34:23 -04:00
nm-device-vxlan.c all: remove remaining GParamSpec name/blurb strings 2014-06-19 17:45:03 -04:00
nm-device-vxlan.h platform, devices: add support for vxlan devices 2014-03-06 09:48:15 -05:00
nm-device.c core: fix dhcp4_cleanup() to clear dhcp4_client first (avoids assert accessing NM_DEVICE_DHCP4_CONFIG) 2014-06-23 17:51:51 +02:00
nm-device.h core: block on dispatcher scripts when quitting 2014-06-06 13:43:46 -05:00