1. 18 Apr, 2019 1 commit
    • Thomas Haller's avatar
      platform: fix nm_platform_lnk_gre_to_string() for tap links · 88c9767d
      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)
      (cherry picked from commit 400293d3)
  2. 10 Apr, 2019 1 commit
  3. 09 Apr, 2019 1 commit
    • Beniamino Galvani's avatar
      libnm-core: fix invalid memory access · 76c283ae
      Beniamino Galvani authored
      When we delete the runner.name property, the runner object itself gets
      deleted if that was the only property, and @runner becomes invalid.
       ==13818== Invalid read of size 1
       ==13818==    at 0x55EAF4: nm_streq (nm-macros-internal.h:869)
       ==13818==    by 0x55EAF4: _json_team_normalize_defaults (nm-utils.c:5573)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Address 0x182a9330 is 0 bytes inside a block of size 13 free'd
       ==13818==    at 0x4839A0C: free (vg_replace_malloc.c:530)
       ==13818==    by 0x4857868: json_delete_string (value.c:763)
       ==13818==    by 0x4857868: json_delete (value.c:975)
       ==13818==    by 0x4851FA1: UnknownInlinedFun (jansson.h:129)
       ==13818==    by 0x4851FA1: hashtable_do_del (hashtable.c:131)
       ==13818==    by 0x4851FA1: hashtable_del (hashtable.c:289)
       ==13818==    by 0x55DFDD: _json_del_object (nm-utils.c:5384)
       ==13818==    by 0x55EA70: _json_delete_object_on_string_match (nm-utils.c:5532)
       ==13818==    by 0x55EADB: _json_team_normalize_defaults (nm-utils.c:5549)
       ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
       ==13818==  Block was alloc'd at
       ==13818==    at 0x483880B: malloc (vg_replace_malloc.c:299)
       ==13818==    by 0x4852E8C: lex_scan_string (load.c:389)
       ==13818==    by 0x4852E8C: lex_scan (load.c:620)
       ==13818==    by 0x4853458: parse_object (load.c:738)
       ==13818==    by 0x4853458: parse_value (load.c:862)
       ==13818==    by 0x4853466: parse_object (load.c:739)
       ==13818==    by 0x4853466: parse_value (load.c:862)
       ==13818==    by 0x4853655: parse_json.constprop.7 (load.c:899)
       ==13818==    by 0x48537CF: json_loads (load.c:959)
       ==13818==    by 0x566780: _nm_utils_team_config_set (nm-utils.c:5961)
       ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
       ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
      Fixes: a5642fd9 ('libnm-core: team: rework defaults management on runner properties')
      (cherry picked from commit 80a3031a)
      (cherry picked from commit 3fa39f61)
  4. 02 Apr, 2019 1 commit
  5. 31 Mar, 2019 1 commit
    • Beniamino Galvani's avatar
      build: fix searching dlopen in configure · 13ac745b
      Beniamino Galvani authored
      The 4th argument of AC_SEARCH_LIBS is a list of additional libraries,
      not the name of the variable to hold the result which is always
      ac_cv_search_$function. Also, we should ignore the result when it is
      "none required".
      Fixes: 1f2eeb85 ('build: rename $(LIBDL) to $(DL_LIBS) and modify detection')
      (cherry picked from commit bd4957fc)
      (cherry picked from commit 1fa0914b)
  6. 26 Mar, 2019 1 commit
  7. 15 Mar, 2019 1 commit
  8. 11 Mar, 2019 1 commit
    • Thomas Haller's avatar
      shared/systemd: fix gettid() compat implementation shadowing function from glibc · d160b7b9
      Thomas Haller authored
      On Fedora rawhide we get the following build failure:
          In file included from shared/systemd/src/basic/alloc-util.c:3:
          ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:114:21: error: static declaration of 'gettid' follows non-static declaration
            114 | static inline pid_t gettid(void) {
                |                     ^~~~~~
          In file included from /usr/include/unistd.h:1170,
                           from /usr/include/glib-2.0/gio/gcredentials.h:32,
                           from /usr/include/glib-2.0/gio/gio.h:46,
                           from ./shared/nm-utils/nm-macros-internal.h:31,
                           from ./shared/nm-default.h:293,
                           from ./shared/systemd/sd-adapt-shared/nm-sd-adapt-shared.h:22,
                           from shared/systemd/src/basic/alloc-util.c:3:
          /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of 'gettid' was here
             34 | extern __pid_t gettid (void) __THROW;
                |                ^~~~~~
      glibc supports now gettid() call ([1]) which conflicts with our compat
      implementation. Rename it.
      [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92
      (cherry picked from commit 10276322)
      (cherry picked from commit cfb970b2)
  9. 08 Mar, 2019 1 commit
  10. 07 Mar, 2019 2 commits
    • Lubomir Rintel's avatar
      platform/linux: fix detection of IFA_FLAGS support · 27b75bea
      Lubomir Rintel authored
      The condition got accidentally reversed, which means we're always
      undecided and thus wrongly assuming support and never being able to set
      any addresses.
      This would bother the few that are struck with 3.4 android kernels. Very
      few indeed, given this got unnoticed since 1.10.
      Fixes: 8670aacc ('platform: cleanup detecting kernel support for IFA_FLAGS and IPv6LL')
      (cherry picked from commit d551a089)
      (cherry picked from commit c411b890)
    • Marco Trevisan's avatar
      nm: Fix syntax on introspection annotations · 3e24e328
      Marco Trevisan authored
      Various annotations were added using multiple colons, while only one has
      to be added or g-ir-introspect will consider them part of the description
      (cherry picked from commit 73005fcf)
      (cherry picked from commit b5bbf8ed)
  11. 05 Mar, 2019 2 commits
  12. 04 Mar, 2019 1 commit
  13. 27 Feb, 2019 1 commit
  14. 26 Feb, 2019 1 commit
  15. 25 Feb, 2019 2 commits
  16. 23 Feb, 2019 3 commits
  17. 19 Feb, 2019 3 commits
    • Thomas Haller's avatar
      libnm: fix leaking checkpoints from NMManager · 4c694e46
      Thomas Haller authored
      Fixes: c3efedf5
      (cherry picked from commit 10600bdb)
    • Thomas Haller's avatar
      libnm: fix memleak for NMDeviceTun:hw-address · 38890376
      Thomas Haller authored
      Fixes: 337304f1
      (cherry picked from commit 41ea9fff)
    • Thomas Haller's avatar
      libnm: fix duplicate free in nm_client_checkpoint_rollback() · a505ab42
      Thomas Haller authored
          #0  0x00007fffea7481e5 in _g_log_abort (breakpoint=1) at gmessages.c:554
          #1  0x00007fffea74951d in g_logv (log_domain=0x7fffea78e00e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffcbb0)
              at gmessages.c:1371
          #2  0x00007fffea7496f3 in g_log
              (log_domain=log_domain@entry=0x7fffea78e00e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7fffea798320 "%s: assertion '%s' failed")
              at gmessages.c:1413
          #3  0x00007fffea749f2d in g_return_if_fail_warning
              (log_domain=log_domain@entry=0x7fffea78e00e "GLib", pretty_function=pretty_function@entry=0x7fffea799d40 <__func__.4759> "g_atomic_ref_count_dec", expression=expression@entry=0x7fffea799ca1 "g_atomic_int_get (arc) > 0") at gmessages.c:2762
          #4  0x00007fffea754c12 in g_atomic_ref_count_dec (arc=arc@entry=0x5555558c5280) at grefcount.c:260
          #5  0x00007fffea7302c6 in g_hash_table_unref (hash_table=0x5555558c5240) at ghash.c:1101
          #6  0x00007fffea4b6dbc in clear_op_res (simple=0x55555587ed90 [GSimpleAsyncResult]) at gsimpleasyncresult.c:248
          #7  0x00007fffea4b6dbc in g_simple_async_result_finalize (object=0x55555587ed90 [GSimpleAsyncResult]) at gsimpleasyncresult.c:268
          #8  0x00007fffea67b949 in g_object_unref (_object=<optimized out>) at gobject.c:3346
          #9  0x00007fffea67b949 in g_object_unref (_object=0x55555587ed90) at gobject.c:3238
          #10 0x00007fffe95dea2d in checkpoint_rollback_cb (object=<optimized out>, result=<optimized out>, user_data=0x55555587ed90) at libnm/nm-manager.c:1584
          #11 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5c80 [GTask]) at gtask.c:1148
          #12 0x00007fffea4cb196 in g_task_return (task=0x5555558b5c80 [GTask], type=<optimized out>) at gtask.c:1206
          #13 0x00007fffea5096bb in reply_cb (connection=<optimized out>, res=<optimized out>, user_data=0x5555558b5c80) at gdbusproxy.c:2596
          #14 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5d50 [GTask]) at gtask.c:1148
          #15 0x00007fffea4cb196 in g_task_return (task=0x5555558b5d50 [GTask], type=<optimized out>) at gtask.c:1206
          #16 0x00007fffea4fdd4a in g_dbus_connection_call_done (source=<optimized out>, result=0x5555558b5e20, user_data=0x5555558b5d50) at gdbusconnection.c:5715
          #17 0x00007fffea4ca834 in g_task_return_now (task=0x5555558b5e20 [GTask]) at gtask.c:1148
          #18 0x00007fffea4ca86d in complete_in_idle_cb (task=task@entry=0x5555558b5e20) at gtask.c:1162
          #19 0x00007fffea73e97b in g_idle_dispatch (source=0x7fffdc04eb90, callback=0x7fffea4ca860 <complete_in_idle_cb>, user_data=0x5555558b5e20) at gmain.c:5620
          #20 0x00007fffea74206d in g_main_dispatch (context=0x5555557c8410) at gmain.c:3182
          #21 0x00007fffea74206d in g_main_context_dispatch (context=context@entry=0x5555557c8410) at gmain.c:3847
          #22 0x00007fffea742438 in g_main_context_iterate (context=0x5555557c8410, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3920
          #23 0x00007fffea742762 in g_main_loop_run (loop=0x55555584ed00) at gmain.c:4116
      Fixes: c3efedf5
      (cherry picked from commit 25a3825b)
  18. 18 Feb, 2019 1 commit
  19. 17 Feb, 2019 6 commits
  20. 15 Feb, 2019 1 commit
  21. 05 Feb, 2019 1 commit
    • Lubomir Rintel's avatar
      platform/linux: fix setting of IFA_ADDRESS without a peer · e2409b18
      Lubomir Rintel authored
      Since commit 9ecdba31 ('platform: create netlink messages directly
      without libnl-route-3') we're unconditionally setting IFA_ADDRESS to
      the peer address, even if there's no peer and it's all zeroes.
      The kernel actually stopped caring somewhere around commit caeaba790
      ('ipv6: add support of peer address') in v3.10, but Ubuntu Touch likes
      to run Android's v3.4 on some poorly supported hardware.
      Fixes: 9ecdba31
      (cherry picked from commit ef6d461b)
  22. 04 Feb, 2019 1 commit
    • Beniamino Galvani's avatar
      vpn: add route to vpn gw when parent has a default device route · 6808cd48
      Beniamino Galvani authored
      When the parent device has a device default route (i.e. without
      gateway) and we establish a VPN on top of it, 'ip route get' for the
      VPN gateway returns a device route, which is the same result we get
      for an unreachable VPN gateway. However it is necessary to add the
      route to the gateway or otherwise it will possibly become unreachable
      once the VPN gets activated.
      (cherry picked from commit 797eab2f)
  23. 31 Jan, 2019 1 commit
  24. 17 Jan, 2019 1 commit
  25. 14 Jan, 2019 4 commits