1. 14 Jun, 2019 2 commits
    • Beniamino Galvani's avatar
      cli: don't wait for connection change on update failure · 2666aa0b
      Beniamino Galvani authored
      When saving a connection, we wait the connection-changed signal before
      proceeding to ensure that the remote connection is up to date.
      However, no signal is emitted if the update fails and so we shouldn't
      wait for it.
      Fixes: a370faeb ('cli: wait for changed signal after updating a connection'):
      (cherry picked from commit 2d347e7e)
      (cherry picked from commit 3423629f)
    • Alfonso Sánchez-Beato's avatar
      core/pppd-plugin: wait to recover port settings before notifying death · 61b4f31d
      Alfonso Sánchez-Beato authored
      pppd restores the previous settings for the serial port it uses right
      before exiting. It is especially important to do so because otherwise
      ModemManager is not able to recover the port as it can receive a hangup
      event from the port due to CLOCAL not being restored.  However, there is
      currently a race condition that produces this issue. This is because
      when PHASE_DEAD is notified, pppd still has not restored the port
      settings - it does that a bit later, in the die() function.
      This patch delays notifying PHASE_DEAD until when the exitnotify() hook
      is called by pppd: when this happens the port settings have already been
      There were previously efforts to fix this in commit fe090c34, so
      PHASE_DEAD was used instead of PHASE_DISCONNECT to notify MM that the
      port was disconnected, but that still early to ensure that the port
      settings are restored.
      The MM traces seen when the bug is triggered are:
      ModemManager[2158]: <warn>  (ttyACM1): could not re-acquire serial port lock: (5) Input/output error
      ModemManager[2158]: <warn>  Couldn't load Operator Code: 'Cannot run sequence: 'Could not open serial device ttyACM1: it has been forced close'
      (cherry picked from commit a251712a)
      (cherry picked from commit 3caa0657)
  2. 11 Jun, 2019 5 commits
  3. 29 May, 2019 3 commits
  4. 28 May, 2019 4 commits
  5. 20 May, 2019 1 commit
  6. 19 May, 2019 1 commit
  7. 14 May, 2019 1 commit
    • Thomas Haller's avatar
      core: fix file permissions for "/var/lib/NetworkManager/secret_key" · 7a0f8520
      Thomas Haller authored
      Ooherwise, the file has wrong permissions:
        # ls -la /var/lib/NetworkManager/secret_key
        ----r-xr-x. 1 root root 50 May 14 13:52 /var/lib/NetworkManager/secret_key
      Luckily, /var/lib/NetworkManager should be already
        # ls -lad /var/lib/NetworkManager
        drwx------. 2 root root 8192 May 14 13:57 /var/lib/NetworkManager
      which mitigates this a bit.
      Fixes: dbcb1d6d ('core: let nm_utils_secret_key_read() handle failures internally')
      (cherry picked from commit dc3a2f9b)
      (cherry picked from commit 2d46247c)
  8. 10 May, 2019 2 commits
    • Thomas Haller's avatar
      settings/d-bus: fix boolean return value of "LoadConnections" · 1337ebd9
      Thomas Haller authored
      The boolean value is intended to indicate success. It would indicated
      failure due to a bug.
      Fixes: 297d4985 ('core/dbus: rework D-Bus implementation to use lower layer GDBusConnection API'):
      (cherry picked from commit 22e830f0)
      (cherry picked from commit e73a5058)
    • Thomas Haller's avatar
      settings: avoid assertion for LoadConnections D-Bus method with relative paths · 8fe900d3
      Thomas Haller authored
        $ busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings org.freedesktop.NetworkManager.Settings LoadConnections as 1 relative/filename
      triggers a g_critical() assertion in nm_utils_file_is_in_path():
        #3  0x00007ffff7a19e7d in g_return_if_fail_warning
            (log_domain=log_domain@entry=0x55555586c333 "NetworkManager", pretty_function=pretty_function@entry=0x55555586c0a0 <__FUNCTION__.38585> "nm_utils_file_is_in_path", expression=expression@entry=0x55555586c010 "abs_filename && abs_filename[0] == '/'") at ../glib/gmessages.c:2767
        #4  0x00005555555f1128 in nm_utils_file_is_in_path (abs_filename=abs_filename@entry=0x555555b56670 "dfd", abs_path=<optimized out>) at src/NetworkManagerUtils.c:1077
        #5  0x00005555555a4779 in load_connection (config=<optimized out>, filename=0x555555b56670 "dfd") at src/settings/plugins/keyfile/nms-keyfile-plugin.c:522
        #6  0x00005555557ce291 in nm_settings_plugin_load_connection (self=0x5555559fd400 [NMSKeyfilePlugin], filename=0x555555b56670 "dfd") at src/settings/nm-settings-plugin.c:70
        #7  0x000055555559ccdf in impl_settings_load_connections
            (obj=<optimized out>, interface_info=<optimized out>, method_info=<optimized out>, connection=<optimized out>, sender=<optimized out>, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], parameters=<optimized out>) at src/settings/nm-settings.c:1439
        #8  0x00005555555a9bf9 in dbus_vtable_method_call
            (connection=0x5555559b91b0 [GDBusConnection], sender=sender@entry=0x555555b5c360 ":1.32283", object_path=object_path@entry=0x7fffe0019070 "/org/freedesktop/NetworkManager/Settings", interface_name=<optimized out>, interface_name@entry=0x7fffe002aa70 "org.freedesktop.NetworkManager.Settings", method_name=<optimized out>,
            method_name@entry=0x7fffe00276b0 "LoadConnections", parameters=parameters@entry=0x555555c4a690, invocation=0x7fffe0015ed0 [GDBusMethodInvocation], user_data=0x5555559a1a00)
            at src/nm-dbus-manager.c:947
        #9  0x00007ffff7c506c4 in call_in_idle_cb (user_data=user_data@entry=0x7fffe0015ed0) at ../gio/gdbusconnection.c:4874
        #10 0x00007ffff7a0e8eb in g_idle_dispatch (source=source@entry=0x7fffe00208a0, callback=0x7ffff7c50590 <call_in_idle_cb>, user_data=0x7fffe0015ed0) at ../glib/gmain.c:5627
        #11 0x00007ffff7a11fd0 in g_main_dispatch (context=0x555555994d00) at ../glib/gmain.c:3189
        #12 0x00007ffff7a11fd0 in g_main_context_dispatch (context=context@entry=0x555555994d00) at ../glib/gmain.c:3854
        #13 0x00007ffff7a12368 in g_main_context_iterate (context=0x555555994d00, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:3927
        #14 0x00007ffff7a126b3 in g_main_loop_run (loop=0x555555995e60) at ../glib/gmain.c:4123
        #15 0x000055555558a741 in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:444
      Filter out relative filenames early.
      (cherry picked from commit a1b102ea)
      (cherry picked from commit c21171e0)
  9. 08 May, 2019 6 commits
  10. 03 May, 2019 1 commit
  11. 18 Apr, 2019 2 commits
    • Thomas Haller's avatar
      platform: fix nm_platform_lnk_gre_to_string() for tap links · 400293d3
      Thomas Haller authored
      Why didn't we get a compiler warning about this bug?
      At least clang (3.8.0-2ubuntu4, Ubuntu 16.04) warns:
          CC       src/platform/src_libNetworkManagerBase_la-nm-platform.lo
        ../src/platform/nm-platform.c:5389:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                            lnk->remote ? nm_sprintf_buf (str_remote, " remote %s", nm_utils_inet4_ntop (lnk->remote, str_remote1)) : "",
      Fixes: 4c2862b9 ('platform: add gretap tunnels support')
      (cherry picked from commit dfb899f4)
      (cherry picked from commit ed88c71f)
    • Thomas Haller's avatar
      libnm-core/tests: fix "-Werror=logical-not-parentheses" warning in _sock_addr_endpoint() · 8190a68c
      Thomas Haller authored
          CC       libnm-core/tests/libnm_core_tests_test_general-test-general.o
        In file included from ../shared/nm-default.h:280:0,
                         from ../libnm-core/tests/test-general.c:24:
        ../libnm-core/tests/test-general.c: In function _sock_addr_endpoint:
        ../libnm-core/tests/test-general.c:5911:18: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
          g_assert (!host == (port == -1));
        ../shared/nm-utils/nm-macros-internal.h:1793:7: note: in definition of macro __NM_G_BOOLEAN_EXPR_IMPL
           if (expr) \
        /usr/include/glib-2.0/glib/gmacros.h:376:43: note: in expansion of macro _G_BOOLEAN_EXPR
         #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1))
        /usr/include/glib-2.0/glib/gtestutils.h:116:49: note: in expansion of macro G_LIKELY
                                                      if G_LIKELY (expr) ; else \
        ../libnm-core/tests/test-general.c:5911:2: note: in expansion of macro g_assert
          g_assert (!host == (port == -1));
      Fixes: 713e879d ('libnm: add NMSockAddrEndpoint API')
      (cherry picked from commit 1e8c0873)
      (cherry picked from commit fd8b78dd)
  12. 15 Apr, 2019 1 commit
  13. 12 Apr, 2019 5 commits
  14. 11 Apr, 2019 6 commits
    • Thomas Haller's avatar
      build: merge branch 'build-cleanup-and-disable-ebpf' · a94403bb
      Thomas Haller authored
      - make contrib/rpm similar to master.
      - make .gitlab-ci.yml similar to master.
      - disable eBPF everywhere. Now it must be explicitly disabled.
        It seems to break unit tests on gitlab-ci, with something that
        looks like a kernel issue. Or maybe ulimit -l is so small?
        Anyway, disable it for now as there are problems with it.
    • Thomas Haller's avatar
      contrib/rpm: disable eBPF for package builds on Fedora · 3443a800
      Thomas Haller authored
      We have random failures to build on gitlab-ci. Something is wrong,
      at least, eBPF is not working reliably. Disable it for now.
      (cherry picked from commit 0d16b037)
    • Thomas Haller's avatar
      contrib/rpm: make spec file more similar to rhel-7's · 9fc91c23
      Thomas Haller authored
      (cherry picked from commit b3997312)
    • Thomas Haller's avatar
      contrib/rpm: from Fedora 31 onwards use internal DHCP client by default · 7bbb6a20
      Thomas Haller authored
      In RHEL-8.0 we already switched the default DHCP plugin.
      It's past time that we do the same for Fedora.
      (cherry picked from commit b1f556ba)
    • Thomas Haller's avatar
      contrib/rpm: disable NDEBUG for meson builds · 46dce6e6
      Thomas Haller authored
      For better or worse, our release builds commonly do not disable assertions.
      That means,
       - NDEBUG is not set, and assert() is in effect
       - G_DISABLE_ASSERT is not set, and g_assert() is in effect
       - G_DISABLE_CHECKS is not set, and g_return*() is in effect.
      On the other hand, NM_MORE_ASSERTS is not enabled by default and nm_assert()
      is stripped away. That is the actual purpose of nm_assert(): it is
      commonly disabled on release builds, while all other assertions are
      Note that it is fully supported to build NetworkManager with all kind of
      assertions disabled. However, such a configuration is not much tested
      and I would not recommend it for that reason.
      %meson expands to
        $ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled -Db_ndebug=true . x86_64-redhat-linux-gnu $OTHER_ARGS
      thus passing -DNDEBUG to the meson build. Override that.
      (cherry picked from commit ef338667)
    • Thomas Haller's avatar
      build: disable eBPF by default · 38ee0c78
      Thomas Haller authored
      We have random failures to build on gitlab-ci. Something is wrong,
      at least, eBPF is not working reliably. Disable it for now.
      (cherry picked from commit 52ea426b)