Commit graph

22297 commits

Author SHA1 Message Date
Thomas Haller
014d6a2c78 shared/tests: add test for unaligned reads 2019-02-22 09:58:09 +01:00
Thomas Haller
fefb965cfe libnm: fix leak in nm_client_add_and_activate_connection{2,_async}()
Detected via valgrind:

  $ ./tools/run-nm-test.sh -m -v libnm/tests/test-nm-client -p /libnm/active-connections

Fixes: fbb038af5e
2019-02-22 08:14:01 +01:00
Thomas Haller
b7d4ad8547 wifi-p2p: drop WiFi-P2P "group-owner" property from D-Bus API and libnm
It's not yet implemented server-side.

Until it is clear that we need this property and until it is implemented,
drop it again from public API.

See-also: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/80#note_118004
2019-02-21 15:34:55 +01:00
Thomas Haller
5106d7290b cli/tests: fix tests after adding polkit action for Wi-Fi scans
Fixes: 243af16c5b
2019-02-21 15:33:28 +01:00
Jonathan Kang
243af16c5b Add polkit action for Wi-Fi scans
Previously, Wi-Fi scans uses polkit action
"org.freedesktop.NetworkManager.network-control". This is introduced
in commit 5e3e19d0. But in a system with restrict polkit rules, for
example "org.freedesktop.NetworkManager.network-control" was set as
auth_admin. When you open the network panel of GNOME Control Center, a
polkit dialog will keep showing up asking for admin password, as GNOME
Control Center scans the Wi-Fi list every 15 seconds.

Fix that by adding a new polkit action
"org.freedesktop.NetworkManager.wifi.scan" so that distributions can
add specific rule to allow Wi-Fi scans.

[thaller@redhat.com: fix macro in "shared/nm-common-macros.h"]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/68
2019-02-21 13:49:17 +01:00
Thomas Haller
696cf38f45 supplicant: avoid G_VARIANT_BUILDER_INIT() from glib 2.50
G_VARIANT_BUILDER_INIT() was only added in glib 2.50, hence we cannot use
it.

Maybe nm-glib.h should provide a compat macro, but the macro relies
on the magic number GVSB_MAGIC_PARTIAL, which is private to glib.
It's not clear that we can savely provide such a compat implementation
for older glib variants.

Fixes: 642f15f2f6
2019-02-21 13:27:34 +01:00
Thomas Haller
d10024684f cli: fix generated documentation
Fixes: 8ed7aef26d
2019-02-21 10:19:11 +01:00
Thomas Haller
229b4fdd81 wifi-p2p: merge branch 'benzea/WFDIEs'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/125

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/84
2019-02-21 10:11:25 +01:00
Benjamin Berg
8fd5505ed5 device: Set WFD IEs when connecting to P2P device
Set the WFD IEs before trying to connect to a P2P device. Reset the
value when cancelling or when disconnecting.
2019-02-21 10:10:20 +01:00
Benjamin Berg
642f15f2f6 supplicant: Add API to set WFD IEs
This API allows setting the global WFDIEs property of wpa_supplicant.
Ideally it would be better if this property was per-device, but this is
a limitation of wpa_supplicant.
2019-02-21 10:10:20 +01:00
Benjamin Berg
3d12dbc0a7 Remove WFD IEs property from P2P device
While this can be considered a property of the P2P device, the API will
require setting it through the settings when activating a connection. As
such, having a (read only) property on the device is not very useful, so
remove it again.
2019-02-21 10:10:20 +01:00
Benjamin Berg
8ed7aef26d core/setting-wifi-p2p: Add WFD IEs property to P2P settings
This is a protocol specific extension to Wi-Fi frames which need to be
set in certain conditions. The P2P device will use this to update the
corresponding wpa_supplicant property.
2019-02-21 10:10:20 +01:00
Benjamin Berg
181326bac7 core/setting-wifi-p2p: Use correct constant for wps-method property
The equivalent constant from the wireless settings was used. Simply
switch to use the P2P specific define.
2019-02-21 10:10:20 +01:00
Beniamino Galvani
b5efcf08f4 all: move nm_utils_bin2hexstr_full() to shared
reuse++
2019-02-21 09:36:17 +01:00
Thomas Haller
d2144019d8 keyfile: merge branch 'th/keyfile-cleanup'
https://github.com/NetworkManager/NetworkManager/pull/297
2019-02-21 09:19:00 +01:00
Thomas Haller
045d1d350f keyfile: cleanup _internal_write_connection()
- use gs_free instead of explicit free().

- use nm_streq*() instead of strcmp().

- move deletion of existing file after we successfully wrote
  the new file.

- add parameter existing_path_readonly, to avoid to overwrite or
  delete the existing path (if it exists). This is still mostly unused,
  but will be necessary when we have read-only directories.
2019-02-21 09:17:58 +01:00
Thomas Haller
f324091557 keyfile: use nm_utils_file_is_in_path() for detecting required rename 2019-02-21 09:17:58 +01:00
Thomas Haller
6c07faa013 shared/nm-glib: add our own g_steal_pointer() macro to shadow the one from glib
g_steal_pointer() as provided by glib improved significantly. Nowadays it
casts the return type via the non-standard typeof() operator.

But this useful feature is only enabled with

    GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_58

which NetworkManager does not set.

This macro is hardly rocket science. Always provide our own
implementation, that always does the casting (we rely on gcc/clang
to support typeof() already at many places).
2019-02-21 07:22:36 +01:00
Thomas Haller
a13b2397de ifcfg-rh: don't rely on g_steal_pointer() returning a void pointer
Next, we will update g_steal_pointer() to cast the return type
to the type of the argument. Hence, this automatic conversion
from setting (sub) classes to NMSetting no longer works.

Add an explict cast.
2019-02-21 07:22:36 +01:00
Beniamino Galvani
787a18c467 systemd: merge branch systemd into master 2019-02-20 19:18:52 +01:00
Beniamino Galvani
62e6df1f1c systemd: update code from upstream (2019-02-20)
This is a direct dump from systemd git.

======

SYSTEMD_DIR=../systemd
COMMIT=eb5149ba7462e0e27a349fcf9f8514440b06067c

(
  cd "$SYSTEMD_DIR"
  git checkout "$COMMIT"
  git reset --hard
  git clean -fdx
)

git ls-files -z :/src/systemd/src/ \
                :/shared/systemd/src/ \
                :/shared/nm-utils/unaligned.h | \
  xargs -0 rm -f

nm_copy_sd_shared() {
    mkdir -p "./shared/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1"
}

nm_copy_sd_core() {
    mkdir -p "./src/systemd/$(dirname "$1")"
    cp "$SYSTEMD_DIR/$1" "./src/systemd/$1"
}

nm_copy_sd_nmutils() {
    mkdir -p "./shared/nm-utils/"
    cp "$SYSTEMD_DIR/$1" "./shared/nm-utils/${1##*/}"
}

nm_copy_sd_core "src/libsystemd-network/arp-util.c"
nm_copy_sd_core "src/libsystemd-network/arp-util.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c"
nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h"
nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c"
nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h"
nm_copy_sd_core "src/libsystemd-network/lldp-internal.h"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c"
nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h"
nm_copy_sd_core "src/libsystemd-network/lldp-network.c"
nm_copy_sd_core "src/libsystemd-network/lldp-network.h"
nm_copy_sd_core "src/libsystemd-network/network-internal.c"
nm_copy_sd_core "src/libsystemd-network/network-internal.h"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c"
nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c"
nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c"
nm_copy_sd_core "src/libsystemd-network/sd-lldp.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-source.h"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.c"
nm_copy_sd_core "src/libsystemd/sd-event/event-util.h"
nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c"
nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h"
nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c"
nm_copy_sd_core "src/shared/dns-domain.c"
nm_copy_sd_core "src/shared/dns-domain.h"
nm_copy_sd_core "src/systemd/_sd-common.h"
nm_copy_sd_core "src/systemd/sd-dhcp-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp-lease.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-client.h"
nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h"
nm_copy_sd_core "src/systemd/sd-event.h"
nm_copy_sd_core "src/systemd/sd-id128.h"
nm_copy_sd_core "src/systemd/sd-ipv4acd.h"
nm_copy_sd_core "src/systemd/sd-ipv4ll.h"
nm_copy_sd_core "src/systemd/sd-lldp.h"
nm_copy_sd_core "src/systemd/sd-ndisc.h"
nm_copy_sd_nmutils "src/basic/unaligned.h"
nm_copy_sd_shared "src/basic/alloc-util.c"
nm_copy_sd_shared "src/basic/alloc-util.h"
nm_copy_sd_shared "src/basic/async.h"
nm_copy_sd_shared "src/basic/env-file.c"
nm_copy_sd_shared "src/basic/env-file.h"
nm_copy_sd_shared "src/basic/env-util.c"
nm_copy_sd_shared "src/basic/env-util.h"
nm_copy_sd_shared "src/basic/escape.c"
nm_copy_sd_shared "src/basic/escape.h"
nm_copy_sd_shared "src/basic/ether-addr-util.c"
nm_copy_sd_shared "src/basic/ether-addr-util.h"
nm_copy_sd_shared "src/basic/extract-word.c"
nm_copy_sd_shared "src/basic/extract-word.h"
nm_copy_sd_shared "src/basic/fd-util.c"
nm_copy_sd_shared "src/basic/fd-util.h"
nm_copy_sd_shared "src/basic/fileio.c"
nm_copy_sd_shared "src/basic/fileio.h"
nm_copy_sd_shared "src/basic/fs-util.c"
nm_copy_sd_shared "src/basic/fs-util.h"
nm_copy_sd_shared "src/basic/hash-funcs.c"
nm_copy_sd_shared "src/basic/hash-funcs.h"
nm_copy_sd_shared "src/basic/hashmap.c"
nm_copy_sd_shared "src/basic/hashmap.h"
nm_copy_sd_shared "src/basic/hexdecoct.c"
nm_copy_sd_shared "src/basic/hexdecoct.h"
nm_copy_sd_shared "src/basic/hostname-util.c"
nm_copy_sd_shared "src/basic/hostname-util.h"
nm_copy_sd_shared "src/basic/in-addr-util.c"
nm_copy_sd_shared "src/basic/in-addr-util.h"
nm_copy_sd_shared "src/basic/io-util.c"
nm_copy_sd_shared "src/basic/io-util.h"
nm_copy_sd_shared "src/basic/list.h"
nm_copy_sd_shared "src/basic/log.h"
nm_copy_sd_shared "src/basic/macro.h"
nm_copy_sd_shared "src/basic/mempool.c"
nm_copy_sd_shared "src/basic/mempool.h"
nm_copy_sd_shared "src/basic/missing_fcntl.h"
nm_copy_sd_shared "src/basic/missing_type.h"
nm_copy_sd_shared "src/basic/parse-util.c"
nm_copy_sd_shared "src/basic/parse-util.h"
nm_copy_sd_shared "src/basic/path-util.c"
nm_copy_sd_shared "src/basic/path-util.h"
nm_copy_sd_shared "src/basic/prioq.c"
nm_copy_sd_shared "src/basic/prioq.h"
nm_copy_sd_shared "src/basic/process-util.c"
nm_copy_sd_shared "src/basic/process-util.h"
nm_copy_sd_shared "src/basic/random-util.c"
nm_copy_sd_shared "src/basic/random-util.h"
nm_copy_sd_shared "src/basic/refcnt.h"
nm_copy_sd_shared "src/basic/set.h"
nm_copy_sd_shared "src/basic/signal-util.h"
nm_copy_sd_shared "src/basic/siphash24.h"
nm_copy_sd_shared "src/basic/socket-util.c"
nm_copy_sd_shared "src/basic/socket-util.h"
nm_copy_sd_shared "src/basic/sparse-endian.h"
nm_copy_sd_shared "src/basic/stat-util.c"
nm_copy_sd_shared "src/basic/stat-util.h"
nm_copy_sd_shared "src/basic/stdio-util.h"
nm_copy_sd_shared "src/basic/string-table.c"
nm_copy_sd_shared "src/basic/string-table.h"
nm_copy_sd_shared "src/basic/string-util.c"
nm_copy_sd_shared "src/basic/string-util.h"
nm_copy_sd_shared "src/basic/strv.c"
nm_copy_sd_shared "src/basic/strv.h"
nm_copy_sd_shared "src/basic/time-util.c"
nm_copy_sd_shared "src/basic/time-util.h"
nm_copy_sd_shared "src/basic/tmpfile-util.c"
nm_copy_sd_shared "src/basic/tmpfile-util.h"
nm_copy_sd_shared "src/basic/umask-util.h"
nm_copy_sd_shared "src/basic/utf8.c"
nm_copy_sd_shared "src/basic/utf8.h"
nm_copy_sd_shared "src/basic/util.c"
nm_copy_sd_shared "src/basic/util.h"
2019-02-20 17:53:22 +01:00
Thomas Haller
209ff015e2 dhcp: merge branch 'th/dhcp-internal-mulitple-routers'
https://bugzilla.redhat.com/show_bug.cgi?id=1634657

https://github.com/NetworkManager/NetworkManager/pull/265
2019-02-20 10:03:11 +01:00
Thomas Haller
c2b3b9b955 dhcp/internal: handle localhost and 0.0.0.0 DNS/NTP servers specially
- regarding the DHCP options, we should not suppress them. If the lease
  contains such bogus(?) addresses, we still want to expose them on
  D-Bus without modification.

- regrading using the DNS server, ignore localhost addresses like done for
  systemd-networkd ([1], [2]).

Until recently, the DHCP library would internally suppress such
addresses ([3]). That is no longer the case, and we should handle
them specially.

[1] https://github.com/systemd/systemd/issues/4524
[2] d9ec2e632d
[3] 334d5682ae
2019-02-20 10:02:30 +01:00
Thomas Haller
f3e1dea1fe dhcp/internal: handle multiple Router options in internal DHCP clint
https://bugzilla.redhat.com/show_bug.cgi?id=1634657
2019-02-20 10:01:09 +01:00
Thomas Haller
334d5682ae systemd: merge branch 'dhcp-router-option-list'
Also adjust "src/dhcp/nm-dhcp-systemd.c" for the change of the internal
DHCP client API.

https://github.com/systemd/systemd/pull/11208
2019-02-20 09:59:54 +01:00
Thomas Haller
1d0b07bcfc dhcp/internal: cleanup logging and failure handling in lease_to_ip4_config()
... and lease_to_ip6_config().

- Handle reasons that render the lease invalid first, before logging
  anything. This way, upon invalid lease we don't have partially logged
  about the lease.

- prefer logging one line for options that contain multiple values, for
  example for search domains.

- reorder statements to consistently log first before calling add_option().

- prefer

      g_string_append (nm_gstring_add_space_delimiter (str), ...

  over

      g_string_append_printf (str, "%s%s", str->len ? " " : "", ...

- use @addr_str buffer directly, instead of assigning to another
  temporary variable.
2019-02-19 16:18:57 +01:00
Thomas Haller
ca540adfeb systemd: network: avoid inet_ntoa() in favor of inet_ntop()
Imported from systemd:

    inet_ntop() is not documented to be thread-safe, so it should not
    be used in the DHCP library. Arguably, glibc uses a thread local
    buffer, so indeed there is no problem with a suitable libc. Anyway,
    just avoid it.

189255d2b5
2019-02-19 16:18:57 +01:00
Thomas Haller
47123e493a shared: add nm_ip4_addr_is_localhost() util 2019-02-19 16:18:57 +01:00
Thomas Haller
19c3d1f58b systemd: dhcp: move filtering of bogus DNS/NTP addresses out of DHCP client
Imported from systemd:

    The DHCP client should not pre-filter addresses beyond what RFC
    requires. If a client's user (like networkd) wishes to skip/filter
    certain addresses, it's their responsibility.

    The point of this is that the DHCP library does not hide/abstract
    information that might be relevant for certain users. For example,
    NetworkManager exposes DHCP options in its API. When doing that, the
    options should be close to the actual lease.

    This is related to commit d9ec2e632df4905201facf76d6a205edc952116a
    (dhcp4: filter bogus DNS/NTP server addresses silently).

072320eab0
2019-02-19 16:18:57 +01:00
Thomas Haller
39ac79c55d systemd: dhcp: handle multiple addresses for "Router" (option 3) in DHCP library
Imported from systemd:

    The Router DHCP option may contain a list of one or more
    routers ([1]). Extend the API of sd_dhcp_lease to return a
    list instead of only the first.

    Note that networkd still only uses the first router (if present).
    Aside from extending the internal API of the DHCP client, there
    is almost no change in behavior. The only visible difference in
    behavior is that the "ROUTER" variable in the lease file is now a
    list of addresses.

    Note how RFC 2132 does not define certain IP addresses as invalid for the
    router option. Still, previously sd_dhcp_lease_get_router() would never
    return a "0.0.0.0" address. In fact, the previous API could not
    differenciate whether no router option was present, whether it
    was invalid, or whether its first router was "0.0.0.0". No longer let
    the DHCP client library impose additional restrictions that are not
    part of RFC. Instead, the caller should handle this. The patch does
    that, and networkd only consideres the first router entry if it is not
    "0.0.0.0".

    [1] https://tools.ietf.org/html/rfc2132#section-3.5

This also required adjusting "src/dhcp/nm-dhcp-systemd.c" due to the
changed internal API.

f8862395e8
2019-02-19 16:18:57 +01:00
Thomas Haller
2b8434ea46 systemd: network: don't return allocated buffer of zero length from deserialize_in_addrs()
Imported from systemd:

    deserialize_in_addrs() allocates the buffer before trying to parse
    the IP address. Since a parsing error is silently ignored, the returned
    size might be zero. In such a case we shouldn't return any buffer.

    Anyway, there was no leak, because there are only two callers like

        r = deserialize_in_addrs(&lease->dns, dns);

    which both keep the unused buffer and later release it.

    Note that deserialize_in_addrs() doesn't free the pointer before
    reassigning the new output. The caller must take care to to pass
    "ret" with an allocated buffer that would be leaked when returning
    the result.

c24b682162
2019-02-19 16:18:57 +01:00
Thomas Haller
c3f6356a39 docs: use numeric values in enum definitions in public headers
The public headers are parsed with gtk-doc. Define enum values
as plain numbers, otherwise the documentation might have problems
picking up the right value.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/126
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/83
2019-02-19 16:08:11 +01:00
Thomas Haller
83c1a189ff wifi-p2p: merge branch 'benzea/fix-p2p-crash'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/85
2019-02-19 15:25:06 +01:00
Benjamin Berg
3a2aa5632d device: Recheck P2P availability after setting a supplicant interface
The newly set interface may already be in a READY state. In that case,
the device should progress into the DISCONNECTED state rather than
remaining in the UNAVAILABLE state.
2019-02-19 15:00:48 +01:00
Benjamin Berg
3e079e87a5 device: Destroy P2P device with its parent Wifi device
This can for example happen when a wifi device is unmanaged.
2019-02-19 14:04:37 +01:00
Benjamin Berg
27bc2cb22a device: Ensure P2P device is unavailable without wpa_supplicant
Put the device into UNAVAILABLE state when the corresponding WPA
supplicant management interface is unset. This is important to
explicitly clear any pending state changes that are not permissible when
there is no management interface.
2019-02-19 14:01:39 +01:00
Thomas Haller
10600bdb69 libnm: fix leaking checkpoints from NMManager
Fixes: c3efedf54b
2019-02-19 09:33:05 +01:00
Thomas Haller
41ea9fffbb libnm: fix memleak for NMDeviceTun:hw-address
Fixes: 337304f19d
2019-02-19 09:33:05 +01:00
Thomas Haller
25a3825b51 libnm: fix duplicate free in nm_client_checkpoint_rollback()
#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: c3efedf54b
2019-02-19 09:33:05 +01:00
Thomas Haller
c9244d28ae shared: add nm_g_type_find_implementing_class_for_property() helper
A helper method, only useful for printf debugging -- and thus
unused in the source-tree.

It is relatively cumbersome to lookup the GType that implements
a property. For example, for NMDeviceBond.driver, it should return
NMDevice (which implements the "driver" property).
2019-02-19 09:33:05 +01:00
Thomas Haller
fc9d661018 platform/wireguard: fix parsing WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL from netlink
Fixes: 0827d4c2e4
2019-02-18 15:10:07 +01:00
Thomas Haller
074103f92d all: merge branch 'th/c-list-move'
https://github.com/NetworkManager/NetworkManager/pull/298
2019-02-18 15:01:05 +01:00
Thomas Haller
9ae71bf555 all: use nm_c_list_move_*() helpers 2019-02-18 15:00:10 +01:00
Thomas Haller
a85318f8de shared: add nm_c_list_move_*() helpers 2019-02-18 15:00:10 +01:00
Beniamino Galvani
080f5ee76b ovs: merge branch 'bg/ovs-leaks'
https://github.com/NetworkManager/NetworkManager/pull/296
2019-02-17 19:39:19 +01:00
Beniamino Galvani
29984c07cd ovs: fix dispose()
input and output must be freed only when not NULL.

Also, ovsdb_disconnect() should do nothing if there is no client.

Fixes: 830a5a14cb
2019-02-17 19:39:08 +01:00
Beniamino Galvani
b92f2c9323 ovs: don't leak a GCancellable on connection failure
Every time we clear priv->client we should also clear the cancellable
or it will be leaked.

Fixes: 830a5a14cb
2019-02-17 19:39:08 +01:00
Beniamino Galvani
139b9974fa ovs: fix leak of json objects
Fixes: 830a5a14cb
2019-02-17 19:39:07 +01:00
Beniamino Galvani
8d9685ef98 ovs: use nm_auto_decref_json 2019-02-17 19:39:07 +01:00
Beniamino Galvani
5efa9ff348 shared: add nm_auto_decref_json 2019-02-17 19:39:07 +01:00