summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dns: don't clone DNS configs list for nm_dns_plugin_update()th/fix-dns-priority-for-resolved-bgo783569Thomas Haller2017-06-146-26/+16
| | | | | | No need to clone the list anymore. Unfortunately, GPtrArray is not NULL terminated (without extra effort), so we have to pass on the GPtrArray instance for the length.
* dns: fix negative ipv4.dns-priority for systemd-resolvedThomas Haller2017-06-144-14/+30
| | | | | | | | A negative ipv4.dns-priority and ipv6.dns-priority has the meaning to configure the DNS information of the connection exclusively. With systemd-resolved, that means we must explicitly unset the configuration from other interfaces. https://bugzilla.gnome.org/show_bug.cgi?id=783569
* dns: make configs argument to update a const pointerThomas Haller2017-06-145-7/+7
|
* dns/systemd: remove unused device lookup in add_interface_configuration()Thomas Haller2017-06-141-3/+0
|
* dns: add helper method to get DNS priority from NMDnsIPConfigDataThomas Haller2017-06-142-16/+20
|
* dns: minor refactoring in _collect_resolv_conf_data()Thomas Haller2017-06-141-14/+14
| | | | | | | | | | | | | | | | | The code was correct previously, but it was confusing to me, because - once @skip gets set to TRUE, it stays TRUE for the rest of the loop. - in each additional skipped iteration, it would still set plugin_confs[i] to NULL. Which is not wrong, but confusing. - it would set "prev_prio = prio;" in each iteration. After @skip is set to TRUE, that doesn't matter anymore, but is confusing. Before @skip is set to TRUE it also doesn't really matter to set it more then once, because we only care about the very first priority. - @skip sounded to me like the current iteration would be skipped. But really all remaining will be skipped too.
* dhcp: merge branch 'th/sd-dhcp-domain-search-list-bgo783785'Thomas Haller2017-06-142-60/+74
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=783785
| * dhcp/systemd: add support for DHCPv4 domain search list (option 119)Thomas Haller2017-06-141-2/+14
| |
| * dhcp: cleanup formatting of LOG_LEASE() macro in lease_to_ip4_config()Thomas Haller2017-06-141-15/+15
| | | | | | | | | | | | | | and lease_to_ip6_config(). The use of a prefix should be done by LOG_LEASE() macro, instead of each caller individually.
| * dhcp: reuse string buffer in lease_to_ip4_config()Thomas Haller2017-06-141-17/+9
| | | | | | | | | | In lease_to_ip4_config() avoid creating multiple GString buffers. Just reuse it.
| * dhcp/trivial: rename local variablesThomas Haller2017-06-141-41/+41
| | | | | | | | | | | | | | lease_to_ip6_config() calls the GString temporary buffer "str". That makes sense, use the same name in lease_to_ip4_config(). For that, we have to rename other local variables too.
| * shared: add nm_gstring_prepare() utilThomas Haller2017-06-141-0/+10
|/
* build: fix race creating "libnm-core/tests" directory for ↵Thomas Haller2017-06-141-0/+3
| | | | | | "nm-core-tests-enum-types.c" https://bugzilla.gnome.org/show_bug.cgi?id=783783
* wifi: fix cancelling WPS during pending ProcessCredentialsThomas Haller2017-06-141-2/+2
| | | | | | | When we cancel WPS, we must cancel the GCancellable. Otherwise, ProcessCredentials will return and proceed with Start. Fixes: 9bfb4f0d09c20b84aac9a406b265328d267e0d8b
* systemd: merge branch systemd into masterThomas Haller2017-06-1414-50/+291
|\ | | | | | | | | - adjust nm-sd-adapt.h to new LogRealm - add support for DHCP search domain list
| * systemd: update code from upstream (2017-06-14)Thomas Haller2017-06-1412-42/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2017-06-14, git commit 42d3bf86bb75842602d3712caa2baccd09a1c795. ====== SYSTEMD_DIR=../systemd COMMIT=42d3bf86bb75842602d3712caa2baccd09a1c795 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files :/src/systemd/src/ | xargs -d '\n' rm -f nm_copy_sd() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$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/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.c" 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/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 "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"
* | wifi: merge branch 'th/wifi-wps-chain-async-bgo783499'Thomas Haller2017-06-141-87/+258
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=783499
| * | supplicant: chain asynchronous requests for WPSThomas Haller2017-06-141-83/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't have pending asynchronous requests in parallel, like setting "ProcessCredentials" and "Start", or "Cancel" and "Start". Instead, "Start" is only scheduled after "ProcessCredentials" completed and "ProcessCredentials" is only scheduled after "Cancel" completed. Also, handle the async response of these requests. For one, to achive the chaining mentioned above and to log what happens and possible errors. Upon new enrollment, a previously created GDBusProxy is now reused, where the first operation is to Cancel the previous action. Also, consistently <trace> log what is happening. Not doing all of this is less lines of code. It's also simpler, and faster. But in my opinion, it is (usually) better to check and wait for return values, instead of firing off async requests uncontrolled. It allows us to better know where we are and to log about each individual step. This also makes all operations cancellable. Undoubtedly, correctness and handling failures conflicts with simplicity in this case -- or at least: what I think is "correctness" conflicts.
| * | supplicant/trivial: move code aroundThomas Haller2017-06-141-6/+8
|/ /
* | core: sort addresses in captured IPv4 configurationBeniamino Galvani2017-06-131-0/+12
| | | | | | | | | | | | | | | | | | | | When IPv4 addresses are synchronized to platform, the order of IPv4 addresses matters because the first address is considered the primary one. Thus, nm_ip4_config_capture() should put the primary address as first, otherwise during synchronization addresses will be removed and added back with a different primary/secondary role. https://bugzilla.redhat.com/show_bug.cgi?id=1459813
* | device: don't set MTU of device unless explicitly configuredThomas Haller2017-06-137-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 2b51d3967 "device: merge branch 'th/device-mtu-bgo777251'", we always set the MTU for certain device types during activation. Even if the MTU is neither specified via the connection nor other means, like DHCP. Revert that change. On activation, if nothing explicitly configures the MTU, leave it unchanged. This is like what we do with ethernet's cloned-mac-address, which has a default value "preserve". So, as last resort the default value for MTU is now 0 (don't change), instead of depending on the device type. Note that you also can override the default value in global configuration via NetworkManager.conf. This behavior makes sense, because whenever NM actively resets the MTU, it remembers the previous value and restores it when deactivating the connection. That wasn't implemented before 2b51d3967, and the MTU would depend on which connection was previously active. That is no longer an issue as the MTU gets reset when deactivating. https://bugzilla.redhat.com/show_bug.cgi?id=1460760
* | cli: remove spurious device names from outputBeniamino Galvani2017-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When running one of: nmcli device wifi list ifname wlan0 nmcli device wifi connect ... ifname wlan0 nmcli wrongly adds the device name to the output. Do the completion only when requested. Fixes: 8679793f6b711847d3209ab3cfbd95ab4a2e2488 Fixes: 1a0dfd31c4af5f3e42b4fc8363a2065d8c5a325b
* | ppp: merge branch 'th/ppp-cleanup'Thomas Haller2017-06-091-91/+43
|\ \
| * | ppp: fix cancelling timeout when pppd process exitsThomas Haller2017-06-091-0/+1
| | | | | | | | | | | | | | | Otherwise, we get pppd_timed_out() later, which will emit a DEAD state change at unexpected times.
| * | ppp: cleanup logging pppd exit reason in ppp_watch_cbThomas Haller2017-06-091-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | - don't use assert but be more graceful with g_return_if_fail(). - in case of failure, don't log a debug message after the warning. One message is sufficient, drop "pppd pid %d cleaned up". - print GPid type as long long. - increase log level to warning. pppd dying unexpectedly warrants a warning.
| * | ppp: don't log newlinesThomas Haller2017-06-091-2/+2
| | |
| * | ppp: refactor ppp_exit_code() to split out error to string conversionThomas Haller2017-06-091-63/+26
| | | | | | | | | | | | | | | | | | ppp_exit_code() does too much or too little. Either it should log about all reasons why pppd exited, including signals, or it should just do the status to string conversion. Split it.
| * | ppp/trivial: fix whitespaceThomas Haller2017-06-091-38/+38
| | |
| * | ppp: inline and drop trivial function remove_timeout_handler()Thomas Haller2017-06-091-10/+2
|/ /
* | cli: fix output of iface in overview output (rh#1460219)Thomas Haller2017-06-091-4/+4
|\ \ | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1460219
| * | cli: minor refactoring of if-condition in device_overviewThomas Haller2017-06-091-3/+3
| | | | | | | | | | | | Note that nm_device_get_ip_iface() never returns an emptry string "".
| * | cli: fix output of iface in overview outputThomas Haller2017-06-091-1/+1
|/ / | | | | | | | | | | Fixes: f14845cc200e21ed3aafadc2f9456cb0e2791f56 https://bugzilla.redhat.com/show_bug.cgi?id=1460219
* | device: apply route metric penality only when the default route existsBeniamino Galvani2017-06-091-3/+6
| | | | | | | | | | | | | | | | | | It's useless (and in some cases also harmful) to commit the configuration to update the default route metric when the device has no default route. Also, don't commit configuration for externally activated devices. https://bugzilla.redhat.com/show_bug.cgi?id=1459604
* | core: merge branch 'th/assume-master-rh1452062'Thomas Haller2017-06-086-191/+396
|\ \ | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1452062
| * | device: suppress logging and return error reason from ↵Thomas Haller2017-06-083-28/+37
| | | | | | | | | | | | | | | | | | | | | | | | nm_device_generate_connection() Don't log in a function that basically just inspects state, without mutating it. Instead, pass the reason why a connection could not be generated to the caller so that we have one sensible log message.
| * | manager: cleanup logging message during ↵Thomas Haller2017-06-081-28/+24
| | | | | | | | | | | | | | | | | | | | | | | | recheck_assume_connection()/get_existing_connection() recheck_assume_connection() calls get_existing_connection(). We want *one* logging message telling what's happening. Let get_existing_connection() log "assume:" messages and remove duplicate messages from recheck_assume_connection().
| * | device: remove logging for emitting RECHECK_ASSUME signalThomas Haller2017-06-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The device's RECHECK_ASSUME signal has only NMManager as subscriber and it immediately calls recheck_assume_connection(). With the previous commit, recheck_assume_connection() always logs a debug message, so we don't need this duplicate message anymore.
| * | manager: add more logging to recheck_assume_connection()Thomas Haller2017-06-081-4/+9
| | | | | | | | | | | | and give all lines a logging prefix.
| * | manager: add "rfkill" prefix to related logging messagesThomas Haller2017-06-081-11/+11
| | |
| * | manager: add logging macro _NMLOG3() for logging connection messagesThomas Haller2017-06-082-14/+54
| | | | | | | | | | | | | | | It unifies the way how we print the logging prefix, but also it passes the con_uuid down for structured logging.
| * | manager: add logging macro _NMLOG2() for logging device messagesThomas Haller2017-06-083-45/+63
| | | | | | | | | | | | | | | It unifies the way how we print the logging prefix, but also it passes the ifname down for structured logging.
| * | logging: add LOG3 macrosThomas Haller2017-06-081-0/+31
| | |
| * | device: expose nm_device_state_to_str() function for NMDeviceStateThomas Haller2017-06-082-14/+16
| | |
| * | device: rework device's _NMLOG() logging macroThomas Haller2017-06-081-6/+16
| | | | | | | | | | | | | | | | | | - if the interface-name is NULL, print [null], to distinguish it from (ifname). - evaluate the ifname only once.
| * | manager: fix preserving assume state during activationThomas Haller2017-06-083-50/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally 850c977 "device: track system interface state in NMDevice", intended that a connection can only be assumed initially when seeing a device for the first time. Assuming a connection later was to be prevented by setting device's sys-iface-state to MANAGED. That changed too much in behavior, because we used to assume external connections also when they are activated later on. So this was attempted to get fixed by - acf1067 nm-manager: try assuming connections on managed devices - b6b7d90 manager: avoid generating in memory connections during startup for managed devices It's probably just wrong to prevent assuming connections based on the sys-iface-state. So drop the check for sys-iface-state from recheck_assume_connection(). Now, we can assume anytime on managed, disconnected interfaces, like previously. Btw, note that priv->startup is totally wrong to check there, because priv->startup has the sole purpose of tracking startup-complete property. Startup, as far as NMManager is concerned, is platform_query_devices(). However, the problem is that we only assume connections (contrary to doing external activation) when we have a connection-uuid from the state file or with guess-assume during startup. When assuming a master device, it can fail with (nm-bond): ignoring generated connection (IPv6LL-only and not in master-slave relationship) thus, for internal reason the device cannot be assumed yet. Fix that by attatching the assume-state to the device, so that on multiple recheck_assume_connection() calls we still try to assume. Whenever we try to assume the connection and it fails due to external reasons (like, the connection no longer matching), we clear the assume state, so that we only try as long as there are internal reasons why assuming fails. https://bugzilla.redhat.com/show_bug.cgi?id=1452062
| * | core: allow assuming connections on "nm-owned" software devicesThomas Haller2017-06-081-3/+0
| | | | | | | | | | | | | | | Especially now we load the nm-owned flag from run-state. We very much want to assume connections on such devices.
| * | device: only set nm-owned from statefile during initial setupThomas Haller2017-06-083-11/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The state file should only be read initially when NM starts, that is: during NMManager's platform_query_devices(). At all later points, for example when a software device gets destroyed and re-realized, the state file is clearly no longer relevant. Hence, pass the set-nm-owned flag from NMManager to realize_start_setup(). This is very much the same as with the NM_UNMANAGED_FLAG_USER_EXPLICT flag, which we also read from the state-file.
* | device: check connectivity on the IP interfaceBeniamino Galvani2017-06-081-1/+1
| | | | | | | | | | | | | | | | curl must bind to the interface that has IP configuration, not the underlying device. Without this commit, connectivity check fails on certain connection types (PPPoE, WWAN). Fixes: 9d43869e473b47542520c807dace93a6f9520964
* | bond: check for NULL bond mode value in update_connection()Beniamino Galvani2017-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Don't crash if the bond mode can't be read from sysfs - for example when the interface disappears. The generated connection will be bogus, but at that point it doesn't matter because the in-memory connection will be destroyed. Fixes: 056a973a4fdb68abe8bc7bfc5f31250345d71f21 https://bugzilla.redhat.com/show_bug.cgi?id=1459580
* | ppp: unexport NMPPPManager instance on dispose()Thomas Haller2017-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | Let's explicitly unexports on dispose(). Probably that already happened, because NMExportedObject asserts that it is unexported during !quitting. During quitting, we probably don't tear down the manager. Anyway, we should always unexport.