summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* manager: allow delaying the device activation when the parent is not reallr/virtual-parent-bgo762731Lubomir Rintel2016-03-261-5/+70
| | | | | | | Don't try to realize our device when the parent device is not real. Instead, enqueue the activation and wait until it is active before realizing our device and progressing the device to DISCONNECTED so that it can get connected.
* manager: separate the traversal to disconected to a separate routineLubomir Rintel2016-03-261-22/+33
| | | | | Will be useful when we'll be able to defer the realization of the device.
* active-connection: add parent active connection trackingLubomir Rintel2016-03-262-0/+84
| | | | | Make it possible to let active connection know about an active connection it depends on and emit a signal when the parent is active.
* device: delay the activation if the backing device is not yet thereLubomir Rintel2016-03-261-1/+1
|
* device: only clear the activate request when the device disconnectsLubomir Rintel2016-03-261-1/+2
| | | | | | If it's traversing from unavailable to disconnected (e.g. realizing of the device was delayed because it was awaiting the parent connection), then we just want to progress the activation.
* device: _get_available_connections() with _get_best_connection()Lubomir Rintel2016-03-263-58/+52
| | | | | | We'll need to share the best conneciton logic and it's the only caller of nm_device_get_available_connections(). Let's just move it all to NMDevice and provide the best connection from there instead.
* merge: branch 'lr/developer-gnome'Lubomir Rintel2016-03-2648-2670/+1421
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=764145
| * man: use replace <programlisting> with <synopsis>lr/developer-gnomeBeniamino Galvani2016-03-261-17/+17
| | | | | | | | | | | | It makes more sense and actually looks good in rendered HTML. [lkundrak@v3.sk: wrote the commit message]
| * docs: add manual pages to docbook documentationLubomir Rintel2016-03-262-1/+18
| | | | | | | | This way they will make it to developer.gnome.org.
| * docs: remove some outdated documentationLubomir Rintel2016-03-264-676/+0
| | | | | | | | The migration guide and the old D-Bus API are not needed anymore.
| * docs: replace spec.html with docbook D-Bus API referenceLubomir Rintel2016-03-266-712/+80
| | | | | | | | | | | | May use a lot of improvement (actually documenting the names and objects that use the interfaces in question), but at least this looks a lot better on developer.gnome.org.
| * dbus: use the annotations for documentationLubomir Rintel2016-03-2638-1265/+1265
| | | | | | | | | | gdbus only understands those (and gtk docstrings, which we should eventually use) when generating the documentation.
| * introspection: build docbook when generating the codeLubomir Rintel2016-03-262-1/+43
|/
* po: update German (de) translation (bgo #764175)Christian Kirbach2016-03-251-2264/+2056
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=764175
* platform/tests: fix bug in netns test which can cause mounting tmpfs over /runThomas Haller2016-03-241-3/+3
| | | | | | | | | | | | | | The root-test "/general/netns/bind-to-path" mounts a tmpfs over /var/run for the duration of the test and unmounts it at the end. Due to a bug, we first mount the tmpfs, then switch to another namespace, and finally unmount /var/run on that other namespace. That means, when you run the tests as root, it will bork /run on your system. Fixes: 46f5c07643e6cbf920a44bebe9ac9d3435a5a7b6
* dhcp: don't fail assertions when a DHCP client is not availableBeniamino Galvani2016-03-241-2/+8
| | | | | If no configured client is available, gracefully fail the activation without throwing runtime errors.
* dhcp: fall back to other clients when an invalid one is specifiedBeniamino Galvani2016-03-241-34/+19
| | | | | | If the user specifies an invalid 'dhcp' option in configuration, currently we disable DHCP. Instead, fall back to other available clients, as we do for other options.
* core: accept zero @wait_before_kill_msec in nm_utils_kill_process_sync()Beniamino Galvani2016-03-241-3/+2
| | | | | A zero @wait_before_kill_msec argument should disable the generation of a SIGKILL signal (after a different signal has been sent).
* dns: fix error cleanup in kill_existing()Beniamino Galvani2016-03-241-1/+1
| | | | Fixes: 3e66813db22918abd8da1da9a9ca4828bc59d589
* shared: include <stdlib.h> in "nm-macros-internal.h"Thomas Haller2016-03-241-0/+2
| | | | | | | | "nm-macros-internal.h" uses free() for the "nm_auto_free" macro. Thus, as long as that code is there, we anyway must include <stdlib.h> along the line. Do it in "nm-macros-internal.h" to make the header self-contained.
* dns: merge branch 'th/dns-resolv-conf-file-bgo764004'Thomas Haller2016-03-233-83/+175
|\ | | | | | | | | https://mail.gnome.org/archives/networkmanager-list/2016-March/msg00123.html https://bugzilla.gnome.org/show_bug.cgi?id=764004
| * dns: always reload the dns configuration mode on SIGHUPThomas Haller2016-03-231-12/+53
| |
| * dns: enable dns plugins also with immutable resolv.confThomas Haller2016-03-231-28/+32
| | | | | | | | | | We check whether /etc/resolv.conf is set as immutable. But even then we still want to support our dns plugins like dnsmasq and unbound.
| * dns: add new "rc-manager=file"Thomas Haller2016-03-233-20/+64
| |
| * dns: split create_resolv_conf() out of write_resolv_conf()Thomas Haller2016-03-231-12/+23
| |
| * dns: refactor NMDnsManagerResolvConfMode to string conversionThomas Haller2016-03-231-14/+9
| |
| * dns: fix _NMLOG() macroThomas Haller2016-03-231-8/+5
|/ | | | | | | The buffer was too small to contain _NMLOG_PREFIX_NAME and the pointer, resulting in truncated messages like: dns-mgr[0x561d1183d: set resolv-conf-mode: none
* dnsmasq: use _LOG() macrosThomas Haller2016-03-221-17/+29
| | | | | | The _LOG*() macros based on _NMLOG() prefix each line with a context. Since we no longer log the location of the logging line, this is the more important.
* dns: refactor kill_existing() to always unlink pidfileThomas Haller2016-03-221-23/+35
| | | | | | | | When a pidfile exists, it is always stale after this point and kill_existing() should always unlink it. Also, refactor kill_existing() to use nm_utils_kill_process_sync() which waits for the process to be gone.
* dns: cleanup disposing of NMDnsPluginThomas Haller2016-03-221-8/+1
|
* dns: refactor cleanup and unlink of pidfileThomas Haller2016-03-221-10/+14
|
* dns: cleanup pid file when dnsmasq process terminatedMathieu Trudel-Lapierre2016-03-221-0/+6
| | | | | | | | [thaller@redhat.com: extracted the patch from a larger one] https://mail.gnome.org/archives/networkmanager-list/2016-March/msg00144.html Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
* dns/trivial: fix indentionThomas Haller2016-03-221-14/+14
|
* systemd: merge branch systemd into masterThomas Haller2016-03-227-8/+20
|\ | | | | | | | | | | Update systemd code from upstream. In the meantime, two patches that we applied early in NetworkManager core were applied in upstream systemd too. So, resync.
| * systemd: update code from upstreamThomas Haller2016-03-229-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2016-03-22, git commit 99d91109a6ed7f8bcdeef164fe9497112128944a. ====== SYSTEMD_DIR=../systemd COMMIT=99d91109a6ed7f8bcdeef164fe9497112128944a ( 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/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/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.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/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"
* | dbus: fix a typo in the commentLubomir Rintel2016-03-211-1/+1
| |
* | build: dist $(docbook_generated_man_pages)Thomas Haller2016-03-211-0/+1
| | | | | | | | | | Otherwise, the pre-generated manual pages from docbook are not part of the source tarball.
* | main: create parent directories of NMSTATEDIR with permissions 755Thomas Haller2016-03-213-6/+28
| | | | | | | | | | In case, "$PREFIX/var/lib" does not exist, we want to create those directories with permissions 755, not 700.
* | main: create NMSTATEDIR with permissions 700Thomas Haller2016-03-211-1/+1
| | | | | | | | | | | | | | | | | | "NMSTATEDIR" is "nmstatedir" is "'${localstatedir}'/lib/$PACKAGE" is usually "/var/lib/NetworkManager". The "install-data-hook" in "src/Makefile.am" properly installs the directory with permissions 700. When creating the directory at startup, we must also use those permissions.
* | src/Makefile.am: create $rundir mode 0755 instead of 0700Robby Workman2016-03-211-1/+1
| | | | | | | | | | | | | | Otherwise, $NMRUNDIR/resolv.conf isn't readable by unprivileged users. https://mail.gnome.org/archives/networkmanager-list/2016-March/msg00124.html
* | supplicant-config: fix misleading indentationLubomir Rintel2016-03-201-1/+1
| |
* | dbus: don't do <deny send_interface="..." /> in dbus service fileLubomir Rintel2016-03-201-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It does more than intended; apart from denying messages to that particular interface it also denies all messages non-qualified with an interface globally. This blocks messages completely unrelated to wpa_supplicant, such as NetworkManager communication with the VPN plugins. From the dbus-daemon manual: Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause no-interface messages to be blocked for all services, which is almost certainly not what you intended. Always use rules of the form: <deny send_interface="org.foo.Bar" send_destination="org.foo.Service"/> We can just safely remove those rules, since we're sufficiently protected by the send_destination matches and method calls are disallowed by default anyway. https://bugzilla.gnome.org/show_bug.cgi?id=763880
* | man: document IPv4 subnet for "shared" methodThomas Haller2016-03-201-0/+3
| |
* | device: optimize hashtable usage for shared_ipsThomas Haller2016-03-201-4/+1
| | | | | | | | | | | | No point ins storing "TRUE" as value in the @shared_ips hash table. That forces glib to allocate a separate storage for the value. Just use g_hash_table_add() instead.
* | vpn-connection: do not leak the connection if there's no timeoutLubomir Rintel2016-03-181-1/+3
| |
* | vpn-connection: don't dispose the proxy before we get the disconnect responseLubomir Rintel2016-03-181-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return_method would be rejected by the dbus-daemon when the NM drops its match, resulting in an ugly message in the log: method call time=1458301860.187048 sender=:1.267 -> destination=:1.276 serial=5302 path=/org/freedesktop/NetworkManager/VPN/Plugin; interface=org.freedesktop.NetworkManager.VPN.Plugin; member=Disconnect method call time=1458301860.187054 sender=:1.267 -> destination=org.freedesktop.DBus serial=5303 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch string "type='signal',sender='org.freedesktop.DBus', interface='org.freedesktop.DBus', member='NameOwnerChanged', path='/org/freedesktop/DBus', arg0='org.freedesktop.NetworkManager.libreswan.Connection_10'" method return time=1458301860.187061 sender=org.freedesktop.DBus -> destination=:1.267 serial=1835 reply_serial=5303 ... method return time=1458301860.195351 sender=:1.276 -> destination=:1.267 serial=19 reply_serial=5302 error time=1458301860.195361 sender=org.freedesktop.DBus -> destination=:1.276 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=19 string "Rejected send message, 7 matched rules; type="method_return", sender=":1.276" (uid=0 pid=26915 comm="/usr/libexec/nm-libreswan-service --bus-name org.f") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.267" (uid=0 pid=25724 comm="/usr/sbin/NetworkManager --no-daemon ")" Also, refcount the connection instance. While the proxy is alive, it invokes singal callbacks that get the object as a parameter.
* | dhcp: fix GBytes leak in nm_dhcp_client_start_ip4()Francesco Giudici2016-03-181-1/+4
| |
* | dhcp: support _LOGx_ENABLED() macro in dhcp-clientThomas Haller2016-03-171-1/+8
| | | | | | | | | | | | | | | | The macro _LOGx_ENABLED() is defined with a default implementation that depends on _NMLOG_DOMAIN. Although that default does not check for LOGD_DHCP4 vs. LOGD_DHCP6, still provide it. Determining the correct domain might involve a larger performance impact that what we would safe.
* | test-nm-client: fix the remaining counterLubomir Rintel2016-03-171-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're expecting four callbacks: a client::devices change, client::active-connections change, client::activate callback, and a device::active-connection change. We only hook the second one in the callback to the first one, and only if client::active-connections is not set already. If it is (when running slowly in valgrind), we just decrement the counter. However, as the counter is one less than it should be, it would underflow and we wait forever* instead. For the value of forever=20s, given that's the timeout of the mockup service.
* | rdisc: fix setting netns during consturction of NMRDiscThomas Haller2016-03-171-4/+0
| | | | | | | | | | | | | | We obtain the netns from the platform instance that is passed in. It's wrong to set the current netns in nm_rdisc_init(). Fixes: 3ba944472853d5221ed83c369a77f80ee7305648