Commit Graph

22786 Commits

Author SHA1 Message Date
Lubomir Rintel
0b51fd6447 ovs: correct the reason for tearing down unexpectedly
If the ovsdb entry gets removed without the device being deactivated,
it's because its parent was removed and we should use the
DEPENDENCY_FAILED reason.

This is important because, with that reason, policy knows not to
autoconnect and bring the port that was being removed back.
2019-04-08 09:31:49 +02:00
Lubomir Rintel
1ebaf7730a Revert "ovs: don't traverse interface through disconnected when the ovsdb entry is removed"
Going directly to unmanaged just to prevent auto-connection turns out to
be the wrong thing to do. Perhaps we're reactivating the device, and
unmanaging it would interfere with the new activation.

This reverts commit 045b88a5b5.
2019-04-08 09:31:49 +02:00
Lubomir Rintel
fc5003f750 device: don't shortcut slave state when the master releases it
In general shortcutting state is a no-no. But putting a device to FAILED
state because its master is going down is a crime. It's the wrong state:
the devices should enter it when their connections themselves failed
unexpectedly, and can potentially recover with another actiation.
Otherwise bad things happen,

In particular, the devices automatically enter DISCONNECTED state and
eventually retry autoconnecting. In this case they would attempt to
bring the master back up. Ugh.

This situation happens when a topomost master of multiple levels of
master-slave relationship is deactivated.

Aside from that, shortcutting to DISCONNECTED on unknown change reason
doesn't make sense either. Like, wtf, just traverse through DEACTIVATING
like all the other kids do.
2019-04-08 09:31:49 +02:00
Thomas Haller
bfe75c9575 platform/tests: increase timeout waiting for externally adding IP address
Seems on a busy system, we can hit this timeout. Increase it.

  ERROR:../src/platform/tests/test-common.c:939:_ip_address_add: code should not be reached
2019-04-07 13:24:34 +02:00
Thomas Haller
a5869d1b35 gitlab-ci: run unit tests for n-acd with eBPF disabled
Enabling eBPF causes src/devices/tests/test-acd to fail:

    strace: bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_HASH, key_size=4, value_size=1, max_entries=8, map_flags=0, inner_map_fd=0, map_name="", map_ifindex=0, btf_fd=0, btf_key_type_id=0, btf_value_type_id=0}, 112) = -1 EPERM (Operation not permitted)

    NetworkManager-Message: 10:07:04.404: <warn>  [1554631624.4046] acd[0xa2b400,10]: couldn't init ACD for announcing addresses on interface 'nm-test-veth0': Operation not permitted

Interestingly it does not always fail. Seems to depend on the kernel
which is used in the containerized test environments of gitlab-ci.

For now, just disable eBPF and use the fallback implementation.
2019-04-07 12:58:08 +02:00
Rafael Fontenelle
aae9f97e19 po: update Brazilian Portuguese (pt_BR) translation
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/104
2019-04-06 16:48:33 +02:00
Thomas Haller
a77c5d18c4 cli: fix missing newline for printing error message about "Connection deletion failed"
$ nmcli connection delete Wired\ connection\ 1
  Error: Connection deletion failed: Insufficient privilegesError: not all connections deleted.
2019-04-05 20:25:28 +02:00
Thomas Haller
69765c11fd libnm,infiniband: merge branch 'th/infiniband-max-mtu'
https://bugzilla.redhat.com/show_bug.cgi?id=1534869
https://bugzilla.redhat.com/show_bug.cgi?id=1653494

https://github.com/NetworkManager/NetworkManager/pull/334
2019-04-05 16:29:11 +02:00
Thomas Haller
c422fc06b0 libnm: fix range of MTU property to uint32 for ip-tunnel
This should make no difference, because commonly guint32
is a typedef for guint/unsigned and has the same range.
2019-04-05 16:27:17 +02:00
Thomas Haller
47412936c2 device: limit maximum MTU for connection default of "infiniband.mtu"
Connection defaults should correspond in range to the per-profile values.
"infiniband.mtu" is required to be not larger than 65520, so we also
need to honor that when parsing the connection default.
2019-04-05 16:27:17 +02:00
Thomas Haller
b25cf61a33 libnm/infiniband: lift restriction of MTU to 2044 for IPoIB in "datagram" mode
Traditionally, the MTU in "datagram" transport mode was restricted to
2044. That is no longer the case, relax that.

In fact, choose a very large maximum and don't differenciate between
"connected" mode (they now both use now 65520). This is only the
limitation of the connection profile. Whether setting such large MTUs
actually works must be determined when activating the profile.

Initscripts "ifup-ib" from rdma-core package originally had a limit of 2044.
This was raised to 4092 in rh#1186498. It is suggested to raise it further
in bug rh#1647541.

In general, kernel often does not allow setting large MTUs. And even if it
allows it, it may not work because it also requires the entire network to
be configured accordingly. But that means, it is generally not helpful to
limit the MTU in the connection profile too strictly. Just allow large
MTUs, we need to see at activation time whether the configuration works.

Note also that all other setting types don't validate the range for MTU at
all.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1186498
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1593334
         (rdma-core: raise limit from 2044 to 4092 in ifup-ib)

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1647541
         (rdma-core: raise limit beyond 4092 in ifup-ib)

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1532638#c4
         (rdma-core: MTU related discussion)

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534869
       (NetworkManager bug about this topic, but with lots of unrelated
        discussion. See in particular #c16)

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1653494
2019-04-05 16:27:17 +02:00
Thomas Haller
78d9bd62ff examples: blacklist drivers "wl" and "8188eu" in "31-mac-addr-change.conf" for "wifi.scan-rand-mac-address"
These drivers work bad with changing the MAC address.

See [1], [2], [3] for reports about failures with "wl" driver.

[3] also blacklists driver "8188eu". While we already blacklist "r8188eu",
it seems that some installations use the alternative name "8188eu" [4].

"wpasupplicant" package on Ubuntu 18.04 (bionic) provides the file
"/usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf", which
blacklists the same drivers. See also bug [3] which added the file.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1695696
[2] https://bugzilla.gnome.org/show_bug.cgi?id=777523#c27
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833507
[4] 9a56f32c2a/dkms.conf
2019-04-05 16:13:32 +02:00
Thomas Haller
ab65c085af all: merge branch 'th/strstrip'
https://github.com/NetworkManager/NetworkManager/pull/329
2019-04-04 21:04:26 +02:00
Thomas Haller
610aa5c432 cli: use nm_strstrip_avoid_copy_a() to avoid heap allocation 2019-04-04 21:01:15 +02:00
Thomas Haller
df89f57c1d shared: cleanup _nm_utils_ascii_str_to_bool()
Previously, this would re-implement what nm_strstrip_avoid_copy()
was doing.

Use nm_strstrip_avoid_copy_a() instead, which avoids the code
duplication and the heap allocation in common cases.
2019-04-04 21:01:15 +02:00
Thomas Haller
2861a7ae0a shared: add nm_strstrip_avoid_copy_a() helper 2019-04-04 21:01:15 +02:00
Thomas Haller
26d144d5a0 shared: move nm_memdup(), nm_strndup_a(), and nm_strdup_int() to "nm-macros-internal.h"
The main difference between "shared/nm-utils/nm-macros-internal.h" and
"shared/nm-utils/nm-shared-utils.h" is that the former is header-only
while the latter has a source file as well.

Apart from that, both headers are included everywhere.

The next commit will add nm_strstrip_avoid_copy_a() to
"nm-macros-internal.h" header, which will use nm_strndup_a().
Hence, also nm_strndup_a() should be in "nm-macros-internal.h".
2019-04-04 21:01:15 +02:00
Thomas Haller
08c327f8a6 shared/trivial: rename variables in nm_strndup_a() and nm_str_skip_leading_spaces() macros
"_str" is a very tempting name for a temporary variable.

Rename the variable in nm_strndup_a() macro, so that other macros can
call these (more general) macros (and still use the name "_str").
2019-04-04 21:01:15 +02:00
Beniamino Galvani
9c049b3a00 sriov: merge branch 'bg/sriov-drivers-autoprobe-rh1695093'
https://github.com/NetworkManager/NetworkManager/pull/331
https://bugzilla.redhat.com/show_bug.cgi?id=1695093
2019-04-04 15:37:03 +02:00
Beniamino Galvani
8698f512d7 platform: assume 'sriov_drivers_autoprobe' is 1 when sysfs file is missing
'sriov_drivers_autoprobe' was added in kernel 4.12. With previous
kernel versions NM is currently unable to set any SR-IOV parameter
because it tries to read 'sriov_drivers_autoprobe' which doesn't
exist, assumes that current value is -1 and tries to change it,
failing.

When the file doesn't exist, drivers are automatically probed so we
can assume the value is 1. In this way NM is able to activate a
connection with sriov.autoprobe-drivers=1 (the default) even on older
kernel versions.

Fixes: 1e41495d9a ('platform: sriov: write new values when we can't read old ones')

https://bugzilla.redhat.com/show_bug.cgi?id=1695093
2019-04-04 15:35:13 +02:00
Thomas Haller
dc64745dd8 platform: set errno to ENOENT for nm_platform_sysctl_get() 2019-04-04 15:35:13 +02:00
Beniamino Galvani
e7e5f4a2d6 libnm-core: fix build warning
libnm-core/nm-keyfile.c:679:32: error: 'key_type' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   build_list[build_list_len++] = (BuildListData) {
                                ^
2019-04-04 15:34:41 +02:00
Thomas Haller
899220485e acd: merge branch 'th/gitlab-ci-fixes'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/103
2019-04-04 10:02:03 +02:00
Thomas Haller
dfc4e47cd2 acd/tests: assert that nm_acd_manager_announce_addresses() did not fail 2019-04-04 09:56:56 +02:00
Thomas Haller
331073e03c acd/tests: use nm_auto cleanup attributes for mainloop and NMAcdManager 2019-04-04 09:56:19 +02:00
Thomas Haller
e90f4c31b0 acd: return error code from nm_acd_manager_start_probe()
... and nm_acd_manager_announce_addresses().

The test will need more information to know why it may fail.
Return a NetworkManager error code, instead of a boolean.
2019-04-04 09:56:19 +02:00
Thomas Haller
b761064fd8 core: add nm_auto_free_acdmgr cleanup macro 2019-04-04 09:56:19 +02:00
Thomas Haller
f63594c26b shared: add nm_auto_unref_gmainloop cleanup macro 2019-04-04 09:56:19 +02:00
Thomas Haller
ef338667f8 contrib/rpm: disable NDEBUG for meson builds
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
enabled.

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.
2019-04-04 09:56:19 +02:00
Thomas Haller
c50ef0df3b shared: workaround -Wunused-but-set-variable warning with assertions
Usually, we don't want to build with NDEBUG (because disabling regular
assertions is an untested configuration). Still, when we do, we get
compiler warnings.

Non-debug builds break with a compiler warning:

  $ ccache cc -Ishared/a4d2686@@n-acd@sta -Ishared -I../shared -I../shared/c-siphash/src -I../shared/c-list/src -I../shared/c-rbtree/src -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=gnu11 -fdata-sections -ffunction-sections -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -D_GNU_SOURCE -DSO_ATTACH_BPF=50 -std=c11 -Wno-pointer-arith -Wno-vla -MD -MQ 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o' -MF 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o.d' -o 'shared/a4d2686@@n-acd@sta/n-acd_src_n-acd-probe.c.o' -c ../shared/n-acd/src/n-acd-probe.c
  ../shared/n-acd/src/n-acd-probe.c: In function 'n_acd_probe_unlink':
  ../shared/n-acd/src/n-acd-probe.c:209:13: error: variable 'r' set but not used [-Werror=unused-but-set-variable]
           int r;
               ^

  $ cache cc -Ishared/a4d2686@@c-rbtree@sta -Ishared -I../shared -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=gnu11 -fdata-sections -ffunction-sections -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -std=c11 -MD -MQ 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o' -MF 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o.d' -o 'shared/a4d2686@@c-rbtree@sta/c-rbtree_src_c-rbtree.c.o' -c ../shared/c-rbtree/src/c-rbtree.c
  ../shared/c-rbtree/src/c-rbtree.c: In function 'c_rbtree_move':
  ../shared/c-rbtree/src/c-rbtree.c:456:18: error: variable 't' set but not used [-Werror=unused-but-set-variable]
           CRBTree *t;
                    ^

https://github.com/nettools/n-acd/pull/6
https://github.com/c-util/c-rbtree/pull/3
2019-04-04 09:54:44 +02:00
Thomas Haller
645b195f9c gitlab-ci: print information about test environment in tests
It's just interesting to see in the logs.
2019-04-04 09:54:35 +02:00
Thomas Haller
917cd3eb03 systemd: merge branch systemd into master 2019-04-04 09:49:37 +02:00
Thomas Haller
b603222398 systemd: update code from upstream (2019-04-04)
This is a direct dump from systemd git.

======

SYSTEMD_DIR=../systemd
COMMIT=6e79d2b5a414f49c05392cf5f52072c5f081442e

(
  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/errno-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/memory-util.c"
nm_copy_sd_shared "src/basic/memory-util.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_socket.h"
nm_copy_sd_shared "src/basic/missing_stat.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/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/sort-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-04-04 09:39:16 +02:00
Thomas Haller
9598adac60 cli,wwan: merge partial branch 'lr/gsm-default-apn'
Cherry-pick two patches from "lr/gsm-default-apn" and merge them to
master early.

Related: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/98
2019-04-03 11:50:55 +02:00
Lubomir Rintel
5354fe4e7f wwan/modem-broadband: no point in insisting on pre-existing GSM setting
We can just create a default one upon connection completion.
2019-04-03 11:50:36 +02:00
Lubomir Rintel
4ddc2bb766 clients: do not require gsm.apn
The server doesn't require it either.
2019-04-03 11:50:35 +02:00
Rafael Fontenelle
605a575238 libnm-core: Remove duplicated word
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/97
2019-04-03 11:39:27 +02:00
Thomas Haller
d469421669 connectivity/trivial: add code comment 2019-04-03 11:29:33 +02:00
Antonio Larrosa
4c4dbcb78d Coerce connectivity "LIMITED" to "NONE" when device is disconnected
If the device is disconnected it can't have any connectivity, so we can
set it to NONE instead of LIMITED.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/138
Related: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/99

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/100
2019-04-03 11:25:37 +02:00
Lubomir Rintel
9a8fe5f339 release: bump version to 1.17.2 (development) 2019-04-03 09:04:42 +02:00
Lubomir Rintel
acd734e7b7 merge: branch lr/agent-hints
https://github.com/NetworkManager/NetworkManager/pull/328
2019-04-03 08:59:08 +02:00
Lubomir Rintel
ee73c560b9 secret-agent-simple: pass hints to the auth dialog 2019-04-03 08:57:10 +02:00
Lubomir Rintel
6021ddb349 secret-agent-simple: get rid of an extra variable 2019-04-03 08:57:10 +02:00
Lubomir Rintel
5d481b9210 secret-agent-simple: replace a char array with a GPtrArray
This will make it easier to dynamically add more options.
2019-04-03 08:57:10 +02:00
Lubomir Rintel
b027723e00 Revert "all: goodbye libnm-glib"
We need this for a little little longer :(

This reverts commit 1de8383ad9.
2019-04-03 08:52:38 +02:00
Thomas Haller
61aad8cda4 shared: better implement compat version of explicit_bzero()
If we don't have explicit_bzero(), try a bit harder and use
a volatile pointer.

This is also what libsecret's egg_secure_clear() does [1]. However, for
us this is less important, because commonly we expect glibc to provide
a useable explicit_bzero().

[1] b5442654d4/egg/egg-secure-memory.c (L1352)
2019-04-02 19:30:33 +02:00
Antonio Larrosa
e504b7fc96 Update connectivity value on device removal
When a device is removed (like when the user unplugs a usb network
device) the device object is removed, so it doesn't emit a notify signal
for a change in its connectivity and so, device_connectivity_changed
is not called. This means that nobody updates the global connectivity
value which is potentially wrong if the device was the one providing
network connectivity.

Since device_connectivity_changed's first two parameters aren't actually
used and are there just for the signal to be able to be connected, I
moved the code from device_connectivity_changed to a new
update_connectivity_value function that just takes a NMManager
parameter and also call it from remove_device.

[thaller@redhat.com: fix coding style regarding whitespace]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/141

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/101
2019-04-02 17:19:31 +02:00
Milo Casagrande
aba01d3d8a po: update Italian (it) translation
* Fixed translation errors.
  * Completed untranslated strings.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/102
2019-04-02 16:52:11 +02:00
Yupeng Chang
1dd67583e3 ifupdown: fix connection iterator
Fixes: 6aa66426a4 ('settings/ifupdown: merge eni_ifaces and connections hashes in plugin')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/145
https://bugzilla.redhat.com/show_bug.cgi?id=1694912
2019-04-02 11:33:25 +02:00
Beniamino Galvani
5b5a768b69 clients: only ask secrets for settings that require them
When nmcli needs secrets for a connection it asks them for every known
setting. nmtui is a bit smarter and asks them only for settings that
actually exist in the connection. Make a step further and let clients
ask secrets only for setting that exist *and* have any secret
property. This decreases the number of D-Bus calls when editing or
showing a connection with secrets.

https://bugzilla.redhat.com/show_bug.cgi?id=1506536
https://github.com/NetworkManager/NetworkManager/pull/327
2019-04-02 11:20:28 +02:00