1. 01 Dec, 2018 6 commits
  2. 30 Nov, 2018 1 commit
    • Beniamino Galvani's avatar
      cli: avoid crash on device disconnect · cf1126f6
      Beniamino Galvani authored
      When nm_device_disconnect_async() returns, the device could be still
      in DEACTIVATING state, and so we also register to device-state signal
      notifications to know when the device state goes to DISCONNECTED.
      
      Sometimes it happens that the device state goes to DISCONNECTED before
      nm_device_disconnect_async() returns. In this case the signal handler
      exits the main loop and then the callback for disconnect_async() is
      executed anyway because it was already dispatched, leading to an
      invalid memory access.
      
      To avoid this we should cancel nm_device_disconnect_async() when we
      are quitting the main loop.
      
      Reproducer:
        nmcli connection add type team ifname t1 con-name t1
        nmcli connection up t1
        nmcli device disconnect t1 & nmcli device delete t1
      
      Crash example:
       ==14955==ERROR: AddressSanitizer: SEGV on unknown address 0xffffffff0000000b (pc 0x7f128c8ba3dd bp 0x0000004be080 sp 0x7ffcda7dc6e0 T0)
       ==14955==The signal is caused by a READ memory access.
          0 0x7f128c8ba3dc in g_string_truncate (/lib64/libglib-2.0.so.0+0x713dc)
          1 0x7f128c8bb4bb in g_string_printf (/lib64/libglib-2.0.so.0+0x724bb)
          2 0x45bdfa in disconnect_device_cb clients/cli/devices.c:2321
          3 0x7f128ca3d1a9 in g_simple_async_result_complete /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gsimpleasyncresult.c:802
          4 0x7f128cf85d0e in device_disconnect_cb libnm/nm-device.c:2354
          5 0x7f128ca4ff73 in g_task_return_now /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1148
          6 0x7f128ca508d5 in g_task_return /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1206
          7 0x7f128ca8ecfc in reply_cb /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gdbusproxy.c:2586
          8 0x7f128ca4ff73 in g_task_return_now /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1148
          9 0x7f128ca508d5 in g_task_return /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1206
          10 0x7f128ca83440 in g_dbus_connection_call_done /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gdbusconnection.c:5713
          11 0x7f128ca4ff73 in g_task_return_now /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1148
          12 0x7f128ca4ffac in complete_in_idle_cb /usr/src/debug/glib2-2.58.1-1.fc29.x86_64/gio/gtask.c:1162
          13 0x7f128c893b7a in g_idle_dispatch gmain.c:5620
          14 0x7f128c89726c in g_main_dispatch gmain.c:3182
          15 0x7f128c897637 in g_main_context_iterate gmain.c:3920
          16 0x7f128c897961 in g_main_loop_run (/lib64/libglib-2.0.so.0+0x4e961)
          17 0x473afb in main clients/cli/nmcli.c:1067
          18 0x7f128c6a1412 in __libc_start_main (/lib64/libc.so.6+0x24412)
          19 0x416c39 in _start (/usr/bin/nmcli+0x416c39)
      
      https://github.com/NetworkManager/NetworkManager/pull/254
      https://bugzilla.redhat.com/show_bug.cgi?id=1546061
      cf1126f6
  3. 29 Nov, 2018 17 commits
  4. 28 Nov, 2018 5 commits
  5. 27 Nov, 2018 1 commit
  6. 23 Nov, 2018 5 commits
    • Patrick Talbert's avatar
      clients: Fix typo in _dump_team_link_watcher output · 25a07396
      Patrick Talbert authored
      This makes the output of a 'con show' for a team device look suspect.
      Signed-off-by: default avatarPatrick Talbert <ptalbert@redhat.com>
      
      Fixes: 4657390d
      
      !53
      25a07396
    • Beniamino Galvani's avatar
      team: make teamd log to syslog · 94ea3a5e
      Beniamino Galvani authored
      When teamd is started in foreground it logs to stderr and its output
      appears in the journal as coming from NM, which is quite confusing.
      
      Use the new TEAM_LOG_OUTPUT environment variable [1] to tell teamd to
      log through syslog, unless NetworkManager is in debug mode.
      
      [1] https://github.com/jpirko/libteam/commit/e47d5db53873
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1596917
      94ea3a5e
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · 9d122e7b
      Thomas Haller authored
      9d122e7b
    • Thomas Haller's avatar
      systemd: update code from upstream (2018-11-23) · 48d64de1
      Thomas Haller authored
      This is a direct dump from systemd git.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=91540eaa5c636f4073955f025c4e72b1bbb4f2e9
      
      (
        cd "$SYSTEMD_DIR"
        git checkout "$COMMIT"
        git reset --hard
        git clean -fdx
      )
      
      git ls-files :/src/systemd/src/ \
                   :/shared/nm-utils/unaligned.h | \
        xargs -d '\n' rm -f
      
      nm_copy_sd() {
          mkdir -p "./src/systemd/$(dirname "$1")"
          cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
      }
      
      nm_copy_sd_shared() {
          mkdir -p "./shared/nm-utils/"
          cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
      }
      
      nm_copy_sd "src/basic/alloc-util.c"
      nm_copy_sd "src/basic/alloc-util.h"
      nm_copy_sd "src/basic/async.h"
      nm_copy_sd "src/basic/env-util.c"
      nm_copy_sd "src/basic/env-util.h"
      nm_copy_sd "src/basic/escape.c"
      nm_copy_sd "src/basic/escape.h"
      nm_copy_sd "src/basic/ether-addr-util.c"
      nm_copy_sd "src/basic/ether-addr-util.h"
      nm_copy_sd "src/basic/extract-word.c"
      nm_copy_sd "src/basic/extract-word.h"
      nm_copy_sd "src/basic/fileio.c"
      nm_copy_sd "src/basic/fileio.h"
      nm_copy_sd "src/basic/fd-util.c"
      nm_copy_sd "src/basic/fd-util.h"
      nm_copy_sd "src/basic/fs-util.c"
      nm_copy_sd "src/basic/fs-util.h"
      nm_copy_sd "src/basic/hash-funcs.c"
      nm_copy_sd "src/basic/hash-funcs.h"
      nm_copy_sd "src/basic/hashmap.c"
      nm_copy_sd "src/basic/hashmap.h"
      nm_copy_sd "src/basic/hexdecoct.c"
      nm_copy_sd "src/basic/hexdecoct.h"
      nm_copy_sd "src/basic/hostname-util.c"
      nm_copy_sd "src/basic/hostname-util.h"
      nm_copy_sd "src/basic/in-addr-util.c"
      nm_copy_sd "src/basic/in-addr-util.h"
      nm_copy_sd "src/basic/io-util.c"
      nm_copy_sd "src/basic/io-util.h"
      nm_copy_sd "src/basic/list.h"
      nm_copy_sd "src/basic/log.h"
      nm_copy_sd "src/basic/macro.h"
      nm_copy_sd "src/basic/mempool.h"
      nm_copy_sd "src/basic/mempool.c"
      nm_copy_sd "src/basic/parse-util.c"
      nm_copy_sd "src/basic/parse-util.h"
      nm_copy_sd "src/basic/path-util.c"
      nm_copy_sd "src/basic/path-util.h"
      nm_copy_sd "src/basic/prioq.h"
      nm_copy_sd "src/basic/prioq.c"
      nm_copy_sd "src/basic/process-util.h"
      nm_copy_sd "src/basic/process-util.c"
      nm_copy_sd "src/basic/random-util.c"
      nm_copy_sd "src/basic/random-util.h"
      nm_copy_sd "src/basic/refcnt.h"
      nm_copy_sd "src/basic/set.h"
      nm_copy_sd "src/basic/signal-util.h"
      nm_copy_sd "src/basic/siphash24.h"
      nm_copy_sd "src/basic/socket-util.c"
      nm_copy_sd "src/basic/socket-util.h"
      nm_copy_sd "src/basic/sparse-endian.h"
      nm_copy_sd "src/basic/stat-util.c"
      nm_copy_sd "src/basic/stat-util.h"
      nm_copy_sd "src/basic/stdio-util.h"
      nm_copy_sd "src/basic/string-table.c"
      nm_copy_sd "src/basic/string-table.h"
      nm_copy_sd "src/basic/string-util.c"
      nm_copy_sd "src/basic/string-util.h"
      nm_copy_sd "src/basic/strv.c"
      nm_copy_sd "src/basic/strv.h"
      nm_copy_sd "src/basic/time-util.c"
      nm_copy_sd "src/basic/time-util.h"
      nm_copy_sd "src/basic/umask-util.h"
      nm_copy_sd_shared "src/basic/unaligned.h"
      nm_copy_sd "src/basic/utf8.c"
      nm_copy_sd "src/basic/utf8.h"
      nm_copy_sd "src/basic/util.c"
      nm_copy_sd "src/basic/util.h"
      nm_copy_sd "src/libsystemd-network/arp-util.c"
      nm_copy_sd "src/libsystemd-network/arp-util.h"
      nm_copy_sd "src/libsystemd-network/dhcp6-internal.h"
      nm_copy_sd "src/libsystemd-network/dhcp6-lease-internal.h"
      nm_copy_sd "src/libsystemd-network/dhcp6-network.c"
      nm_copy_sd "src/libsystemd-network/dhcp6-option.c"
      nm_copy_sd "src/libsystemd-network/dhcp6-protocol.h"
      nm_copy_sd "src/libsystemd-network/dhcp-identifier.c"
      nm_copy_sd "src/libsystemd-network/dhcp-identifier.h"
      nm_copy_sd "src/libsystemd-network/dhcp-internal.h"
      nm_copy_sd "src/libsystemd-network/dhcp-lease-internal.h"
      nm_copy_sd "src/libsystemd-network/dhcp-network.c"
      nm_copy_sd "src/libsystemd-network/dhcp-option.c"
      nm_copy_sd "src/libsystemd-network/dhcp-packet.c"
      nm_copy_sd "src/libsystemd-network/dhcp-protocol.h"
      nm_copy_sd "src/libsystemd-network/lldp-internal.h"
      nm_copy_sd "src/libsystemd-network/lldp-neighbor.c"
      nm_copy_sd "src/libsystemd-network/lldp-neighbor.h"
      nm_copy_sd "src/libsystemd-network/lldp-network.c"
      nm_copy_sd "src/libsystemd-network/lldp-network.h"
      nm_copy_sd "src/libsystemd-network/network-internal.c"
      nm_copy_sd "src/libsystemd-network/network-internal.h"
      nm_copy_sd "src/libsystemd-network/sd-dhcp6-client.c"
      nm_copy_sd "src/libsystemd-network/sd-dhcp6-lease.c"
      nm_copy_sd "src/libsystemd-network/sd-dhcp-client.c"
      nm_copy_sd "src/libsystemd-network/sd-dhcp-lease.c"
      nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c"
      nm_copy_sd "src/libsystemd-network/sd-ipv4ll.c"
      nm_copy_sd "src/libsystemd-network/sd-lldp.c"
      nm_copy_sd "src/libsystemd/sd-event/event-source.h"
      nm_copy_sd "src/libsystemd/sd-event/event-util.c"
      nm_copy_sd "src/libsystemd/sd-event/event-util.h"
      nm_copy_sd "src/libsystemd/sd-event/sd-event.c"
      nm_copy_sd "src/libsystemd/sd-id128/id128-util.c"
      nm_copy_sd "src/libsystemd/sd-id128/id128-util.h"
      nm_copy_sd "src/libsystemd/sd-id128/sd-id128.c"
      nm_copy_sd "src/shared/dns-domain.c"
      nm_copy_sd "src/shared/dns-domain.h"
      nm_copy_sd "src/systemd/_sd-common.h"
      nm_copy_sd "src/systemd/sd-dhcp6-client.h"
      nm_copy_sd "src/systemd/sd-dhcp6-lease.h"
      nm_copy_sd "src/systemd/sd-dhcp-client.h"
      nm_copy_sd "src/systemd/sd-dhcp-lease.h"
      nm_copy_sd "src/systemd/sd-event.h"
      nm_copy_sd "src/systemd/sd-ndisc.h"
      nm_copy_sd "src/systemd/sd-id128.h"
      nm_copy_sd "src/systemd/sd-ipv4acd.h"
      nm_copy_sd "src/systemd/sd-ipv4ll.h"
      nm_copy_sd "src/systemd/sd-lldp.h"
      48d64de1
    • Thomas Haller's avatar
  7. 22 Nov, 2018 2 commits
  8. 21 Nov, 2018 3 commits