1. 13 Dec, 2017 13 commits
    • Thomas Haller's avatar
      e96fabfc
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      wifi: downgrade logging level and support reloading "wifi-backend" configuration · af6f2e49
      Thomas Haller authored
      NM_CONFIG_GET_DATA_ORIG is the configuration that was loaded the first time.
      NM_CONFIG_GET_DATA is the currently loaded one. Sometimes we want to always
      stick to the original configuration, if we don't support reloading the
      parameter (for example main.plugins, because it would be cumbersome to properly
      implementing loading/unloading setting plugins.
      
      In this case however, we can allow reloading the configuration just fine.
      Of course, this only matters, if the device appears after the configuration
      is reloaded, for example by reloading the driver.
      
      Also, don't log any warnings, unless necessary.
      af6f2e49
    • Andrew Zaborowski's avatar
      devices/wifi: Register an IWD PSK agent on dbus · 4d1025f6
      Andrew Zaborowski authored
      Add the PSK agent support to support PSK networks.  Note that the PSK
      itself will be saved by IWD on the first successful connection to the
      network and will not be updated when it is changed by the user on the NM
      side, this still needs fixing like a bunch of other problems.
      
      [bgalvani@redhat.com: fix checking return value of nm_utils_random_bytes()]
      4d1025f6
    • Andrew Zaborowski's avatar
      devices/wifi: Add the wifi-backend config option · 3967eca4
      Andrew Zaborowski authored
      Let the config file select between creating classes of NMDeviceWifi
      (for the usual wpa_supplicant based devices) and NMDeviceIwd depending
      on the new NetworkManager.conf setting.
      
      [bgalvani@redhat.com: fix leaking @backend in create_device()]
      3967eca4
    • Andrew Zaborowski's avatar
      devices/wifi: Track IWD devices, match to NMDeviceIwd objects · a25d99f5
      Andrew Zaborowski authored
      Add the NMIwdManager singleton to be responsible for matching
      NMDeviceIwd objects created from platform devices, to IWD Device dbus
      objects when they appear/disappear.
      a25d99f5
    • Andrew Zaborowski's avatar
      devices/wifi: Add NMDeviceIwd class to support IWD backend · ec1db966
      Andrew Zaborowski authored
      This is very similar to NMDeviceWifi but simplified to remove the things
      currently unsupported and with calls to nm_platform_wifi_* and
      nm_supplicant_* replaced with IWD DBus API calls.  Only unsecured
      infrastructure-mode networks are supported here.
      
      [bgalvani@redhat.com: fix compilation error after rebase for
        NMActRequestGetSecretsCallId]
      [thaller@redhat.com: don't use _() macro strings server side.
        Translating strings only makes sense for clients that set environment
        variables accordingly.]
      ec1db966
    • Andrew Zaborowski's avatar
      devices/wifi: Move is_manf_default_ssid to nm-wifi-utils.c · 89bbcb81
      Andrew Zaborowski authored
      Move the function for easier code reuse.
      89bbcb81
    • Andrew Zaborowski's avatar
      devices/wifi: Move AP list utilities to nm-wifi-ap.c · 0ff94718
      Andrew Zaborowski authored
      Move three functions for easier code reuse.
      0ff94718
    • Thomas Haller's avatar
      systemd: merge branch systemd into master · 8c0dfd71
      Thomas Haller authored
      Systemd instroduces a macro _fallthrough_, see
      https://github.com/systemd/systemd/pull/7389.
      However, it does not yet seem conclusive how to
      handle this properly in ever situation.
      
      While shared/nm-utils/siphash24.c makes use of
      the new macro, don't do that in our fork. siphash24.h
      does not include all systemd headers, hence _fallthrough_
      is not defined. We could re-implement it as _nm_fallthrough,
      but given the open questions, that doesn't seem the
      8c0dfd71
    • Thomas Haller's avatar
      macros: add _nm_fallthrough macro · 2fb7479e
      Thomas Haller authored
      Systemd introduced a _fallthrough_ macro in
      https://github.com/systemd/systemd/pull/7389.
      
      There might still be some issue with it, but as
      I am going to re-import the latest systemd code,
      we get them too.
      
      We need it, because "shared/nm-utils/siphash24.c"
      will use it too, and that source file does not include
      the other systemd macros. So, we will need to re-define
      it.
      2fb7479e
    • Francesco Giudici's avatar
      devices/test: give more time to dad checking in test-arping · 5c6a382d
      Francesco Giudici authored
        # random seed: R02Sc708af827453d4ace33cd27ffd3d7f0b
        1..2
        # Start of arping tests
        **
        NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0)
        ok 1 /arping/1
        PASS: src/devices/tests/test-arping 1 /arping/1
        ./tools/run-nm-test.sh: line 193:  2836 Aborted                 "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "$@"
        # NetworkManager:ERROR:src/devices/tests/test-arping.c:95:test_arping_common: assertion failed (nm_arping_manager_check_address (manager, info->addresses[i]) == info->expected_result[i]): (1 == 0)
        ERROR: src/devices/tests/test-arping - too few tests run (expected 2, got 1)
        ERROR: src/devices/tests/test-arping - exited with status 134 (terminated by signal 6?)
      5c6a382d
    • Thomas Haller's avatar
      systemd: update code from upstream (2017-12-13) · ac29b8cf
      Thomas Haller authored
      This is a direct dump from systemd git on 2017-12-13, git commit
      18a121f9b462e2241c4a590f0a47f5351cd47e0f.
      
      ======
      
      SYSTEMD_DIR=../systemd
      COMMIT=18a121f9b462e2241c4a590f0a47f5351cd47e0f
      
      (
        cd "$SYSTEMD_DIR"
        git checkout "$COMMIT"
        git reset --hard
        git clean -fdx
      )
      
      git ls-files :/src/systemd/src/ \
                   :/shared/nm-utils/siphash24.c \
                   :/shared/nm-utils/siphash24.h \
                   :/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/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_shared "src/basic/siphash24.c"
      nm_copy_sd_shared "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/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-ipv4ll.c"
      nm_copy_sd "src/libsystemd-network/sd-ipv4acd.c"
      nm_copy_sd "src/libsystemd-network/sd-lldp.c"
      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"
      ac29b8cf
  2. 12 Dec, 2017 16 commits
  3. 11 Dec, 2017 11 commits