1. 12 Mar, 2018 5 commits
    • Thomas Haller's avatar
      core: rename "nm-bus-manager.h" to "nm-dbus-manager.h" · a1f37964
      Thomas Haller authored
      The next commit will completely rework NMBusManager and replace
      NMExportedObject by a new type NMDBusObject.
      Originally, NMDBusObject was added along NMExportedObject to ease
      the rework and have compilable, intermediate stages of refactoring. Now,
      I think the new name is better, because NMDBusObject is very strongly related
      to the bus manager and the old name NMExportedObject didn't make that
      I also slighly prefer the name NMDBusObject over NMBusObject, hence
      for consistancy, also rename NMBusManager to NMDBusManager.
      This commit only renames the file for a nicer diff in the next commit.
      It does not actually update the type name in sources. That will be done
    • Thomas Haller's avatar
      device: set properties before emitting the change notification · 8b75f10e
      Thomas Haller authored
      The change doesn't really make a difference. I thought it would, so I
      did it. But turns out (as the code correctly assumes), while the
      notifications are frozen, it's OK to leave the property still in an
      inconsistent state while emitting the notify signal.
      Still, it feels slightly more correct this way, so keep the change.
    • Thomas Haller's avatar
      device/veth: don't use notify() signal to bind changes for "peer" property · 34493c51
      Thomas Haller authored
      The notify() signal is not emitted while the object properties are
      blocked via g_object_freeze_notify(). That makes is unsuitable to
      emit a notification for "peer" property whenver the device's "parent"
      property changes. Because especially with freeze/thaw, we want to emit
      both signals in the same batch, not first emit change signals for "parent",
      and then in a second run the signals for "peer".
      Use the existing parent_changed_notify() virtual function instead.
    • Thomas Haller's avatar
      secret-agent: don't use generated NMDBusSecretAgent proxy · 062f86d8
      Thomas Haller authored
      The generated code is really just a thin wrapper around direct
      GDBusProxy calls. GDBusProxy is reasonably convenient to use directly,
      drop this wrapper.
      We also don't use a generated wrapper for other cases where
      NetworkManager acts as a D-Bus client. There is no reason to
      do it in this case.
      While the nmdbus_*() functions that we were using are small wrappers,
      we also created a NMDBusSecretAgent instance, and hence several other
      functions and symbols are used as well. It's unnecessary.
      This saves 8552 bytes for NetworkManager binary (2817944 vs. 2809392
      bytes for contrib/rpm on x86_64).
    • Thomas Haller's avatar
  2. 10 Mar, 2018 4 commits
    • Thomas Haller's avatar
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      dns: don't leak cached config_variant on exit · 70b24819
      Thomas Haller authored
      Not really serious as it's only on shutdown, but shows up as leak in valgrind.
    • Thomas Haller's avatar
      manager: fix leaking volatile-connection-list on exit · 0b756184
      Thomas Haller authored
      On exit during NMManager's dispose(), we must fist remove active connections
      via active_connection_remove(), before clearing the volatile-connection-list.
      Otheriwise, while deleting the active connection, we schedule a idle action
      to delete the volatile connection on idle, but at that point the dispose()
      already cleaned up the idle list.
        ==3150== 72 (24 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 3,411 of 6,079
        ==3150==    at 0x4C2FB6B: malloc (vg_replace_malloc.c:299)
        ==3150==    by 0x6AB7358: g_malloc (gmem.c:94)
        ==3150==    by 0x6ACEF35: g_slice_alloc (gslice.c:1025)
        ==3150==    by 0x1686B1: connection_flags_changed (nm-manager.c:1823)
        ==3150==    by 0x661F73C: g_closure_invoke (gclosure.c:804)
        ==3150==    by 0x66324DD: signal_emit_unlocked_R (gsignal.c:3635)
        ==3150==    by 0x663AD04: g_signal_emit_valist (gsignal.c:3391)
        ==3150==    by 0x663B66E: g_signal_emit (gsignal.c:3447)
        ==3150==    by 0x2EC753: connection_flags_changed (nm-settings.c:824)
        ==3150==    by 0x661F73C: g_closure_invoke (gclosure.c:804)
        ==3150==    by 0x66324DD: signal_emit_unlocked_R (gsignal.c:3635)
        ==3150==    by 0x663AD04: g_signal_emit_valist (gsignal.c:3391)
        ==3150==    by 0x663B66E: g_signal_emit (gsignal.c:3447)
        ==3150==    by 0x6623C03: g_object_dispatch_properties_changed (gobject.c:1080)
        ==3150==    by 0x1DFD47: dispatch_properties_changed (nm-dbus-object.c:237)
        ==3150==    by 0x6626178: g_object_notify_by_spec_internal (gobject.c:1173)
        ==3150==    by 0x6626178: g_object_notify_by_pspec (gobject.c:1283)
        ==3150==    by 0x2E7377: _notify (nm-settings-connection.c:53)
        ==3150==    by 0x2E7377: nm_settings_connection_set_flags_full (nm-settings-connection.c:2346)
        ==3150==    by 0x2E744D: nm_settings_connection_set_flags (nm-settings-connection.c:2316)
        ==3150==    by 0x2E7466: set_visible (nm-settings-connection.c:316)
        ==3150==    by 0x2E7774: nm_settings_connection_delete (nm-settings-connection.c:795)
        ==3150==    by 0x1665A8: _delete_volatile_connection_do (nm-manager.c:598)
        ==3150==    by 0x1668F4: active_connection_remove (nm-manager.c:625)
        ==3150==    by 0x16ABA7: dispose (nm-manager.c:6726)
        ==3150==    by 0x6624607: g_object_unref (gobject.c:3293)
        ==3150==    by 0x1D779B: _nm_singleton_instance_destroy (nm-core-utils.c:138)
        ==3150==    by 0x4011332: _dl_fini (in /usr/lib64/ld-2.26.so)
        ==3150==    by 0x815FB57: __run_exit_handlers (in /usr/lib64/libc-2.26.so)
        ==3150==    by 0x815FBA9: exit (in /usr/lib64/libc-2.26.so)
        ==3150==    by 0x1383C7: main (main.c:467)
  3. 09 Mar, 2018 6 commits
  4. 08 Mar, 2018 4 commits
  5. 07 Mar, 2018 1 commit
  6. 06 Mar, 2018 1 commit
  7. 05 Mar, 2018 3 commits
  8. 04 Mar, 2018 5 commits
    • Andrew Zaborowski's avatar
      iwd: don't call nm_wifi_ap_set_ssid for empty SSID · 29e9d206
      Andrew Zaborowski authored
      If SSID is an empty string there's no need to call nm_wifi_ap_set_ssid
      as it won't do anything.  It also has an assert checking that NULL is
      passed for an empty SSID and we were passing a non-NULL pointer.
    • Andrew Zaborowski's avatar
      iwd: fix device-added signal handler signature · 8435aa8b
      Andrew Zaborowski authored
      This bug was not causing a crash for me because of the !IS_NM_DEVICE_IWD
      check and because my glib version probably had the assertion within
      While there, change the g_signal_connect line to use the macro for the
      signal name.
    • Andrew Zaborowski's avatar
      iwd: set Device.Powered during set_enable · 6571b576
      Andrew Zaborowski authored
      Make sure .set_enabled uses the Device.Powered property to basically
      bring the netdev UP and DOWN as I understand is expected by the
      nm_device logic.
      Device.Powered should generally reflect the UP state immediately but
      just to avoid possible race conditions .is_available() will now return
      a value that is an AND of the local "enabled" state and IWD's Powered
    • Andrew Zaborowski's avatar
      iwd: Disable timeout for iwd Device.Connect call · f1726810
      Andrew Zaborowski authored
      Change from the default dbus call timeout (-1) to infinite (G_MAXINT)
      because the call may now include the secret requests which have their
      own timeout policies.
    • Andrew Zaborowski's avatar
      iwd: Only request secrets on request from IWD · 90075179
      Andrew Zaborowski authored
      Remove the code (mostly copied from nm-device-wifi.c) that handles
      checking if the secrets were provided and requesting missing secrets
      before starting a connection attempt.  Instead, request secrets when
      we're asked for them by IWD through its agent interface.  This happens
      while the dbus Connect call is running.  We change the NMDevice from
      the CONFIG state to NEED_AUTH and then change back to CONFIG once we
      sent the secrets back to IWD.
      The current code would require the secrets only based on whether a
      network is a KnownNetwork but IWD may need a new passwords even for
      KnownNetworks if the last connection attempt has failed.
  9. 03 Mar, 2018 4 commits
  10. 28 Feb, 2018 4 commits
  11. 26 Feb, 2018 2 commits
    • Thomas Haller's avatar
      libnm/tests: fix compilation of test-general · 65049f67
      Thomas Haller authored
          ../libnm/tests/test-general.c: In function ‘test_fixup_vendor_string’:
          ../libnm/tests/test-general.c:70:3: error: initializer element is not constant
             T_DATA ("3Com", "3Com"),
          ../libnm/tests/test-general.c:70:3: error: (near initialization for ‘data[0]’)
          ../libnm/tests/test-general.c: In function ‘test_fixup_product_string’:
          ../libnm/tests/test-general.c:365:3: error: initializer element is not constant
             T_DATA  ("10/100BaseTX [RTL81xx]", "RTL81xx"),
      Fixes: 817fce91
    • Thomas Haller's avatar
      libnm/tests: avoid compiler message about -fvar-tracking-assignments in test-general.c · 817fce91
      Thomas Haller authored
            CC       libnm/tests/libnm_tests_test_general-test-general.o
          libnm/tests/test-general.c: In function ‘test_fixup_product_string’:
          libnm/tests/test-general.c:328:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
           test_fixup_product_string (void)
      Fixes: 8e32d8fc
  12. 24 Feb, 2018 1 commit
    • Thomas Haller's avatar
      platform/wifi: don't pass ownership of message to nl80211_send_and_recv() · fd166783
      Thomas Haller authored
      Passing ownership with a function call is confusing. Don't do that.
      Since we have the cleanup attribute, it doesn't significantly
      complicate the callers, as all they need to do is marking the
      @msg variable to free the message when going out of scope.
      That results in the function that allocates the message also being
      responsible to free it.