summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: refactor reapply_connection()lr/reapplyThomas Haller2016-01-102-237/+195
| | | | | | | | | | | | | | | | | | | | | | Reapplying a connection should not be done by iterating over and (unsorted) @diffs array. Instead the order matters! E.g. first layer 2 before IP settings. Thus extracting those individual updates on a per-setting base to different reapply_*() functions is more complicated, albeit incorrect in complex cases. We need full control over how to reapply changes, one after the other. Also, once we start applying changes, we cannot really abort on error. We can only continue best-effort and hope for the best. Also, always reapply certain settings, even if the configuration doesn't change. That means, if the user externally deletes a static IP address, he can call reapply() to restore it. Even though he doesn't provide a different setting to apply. Also revert the changes to nm_device_reapply_settings_immediately(). Effectively there is little code that can be reused. Add audit logging.
* audit: allow passing GDBusMethodInvocation context to audit methodsThomas Haller2016-01-102-16/+28
|
* device: apply the firewall zone and metered state on Reapply()Lubomir Rintel2016-01-101-30/+63
| | | | Reuse some code with the immediate reapply mechanism.
* device: add possibility to reapply the ipv6 settingsLubomir Rintel2016-01-101-0/+53
|
* device: add possibility to reapply the ipv4 settingsLubomir Rintel2016-01-101-10/+66
|
* cli: add nmcli d reapplyLubomir Rintel2016-01-103-3/+138
| | | | Client support for O.FD.NM.Device.Reapply().
* libnm: add nm_device_reapply()Lubomir Rintel2016-01-103-0/+140
| | | | Client support for O.FD.NM.Device.Reapply().
* device: add O.FD.NM.Device.Reapply() callLubomir Rintel2016-01-102-0/+191
| | | | | The introspection data and daemon stub. There's no settings that can be reapplied at the moment.
* device: refactor the ip cleanupLubomir Rintel2016-01-101-21/+40
| | | | | Split it up and move upwards. It will be useful for runtime reconfig of IPv4 configuration.
* trivial: fix whitespaceThomas Haller2016-01-081-4/+4
|
* ca: update Catalan (ca) translation (bgo #760147)Jordi Mas2016-01-081-1760/+3026
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=760147
* contrib/rpm: install pre-up dispatcher script "10-ifcfg-rh-routes.sh" as no-waitThomas Haller2016-01-082-1/+6
| | | | | | | | | The main reason to introduce the "no-wait.d" dispatcher directory was "10-ifcfg-rh-routes.sh", which (as a pre-up script) delays activation. We even extracted the script to a separate package on RHEL to avoid delays by default. Invoke the script via no-wait.d.
* manager: get rid of unused definesBeniamino Galvani2016-01-071-2/+0
|
* gitignore: ignore "include/" directoryThomas Haller2016-01-071-0/+1
| | | | | | When switching between "nm-1-0" branch and "master", it is common to have a left-over "include/" directory with build artifacts. Add it to gitignore.
* build: minor change creating symlinks in install-exec-hook for nmtuiThomas Haller2016-01-071-2/+2
|
* build: use symlinks for nmtuiMichael Biebl2016-01-072-1/+3
| | | | | | Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui. https://bugzilla.gnome.org/show_bug.cgi?id=759824
* core: merge branch 'bg/device-zero-mac-fix-rh1288110'Beniamino Galvani2016-01-074-47/+77
|\ | | | | | | | | | | | | Fix activation for ethernet devices that appear with a zero initial MAC address. https://bugzilla.redhat.com/show_bug.cgi?id=1288110
| * device: wait for valid MAC before making ethernet devices availableBeniamino Galvani2016-01-073-5/+45
| | | | | | | | | | | | | | | | | | | | | | In certain situations, ethernet links first appear with a zero MAC address and then the MAC changes some time later. Currently NM does not deal correctly with this scenario since it initializes wrong @initial_hwaddr and @permanent_hwaddr on the device and tries to immediately activate it. To fix this, initialize the device's addresses only when the MAC becomes valid and make the device available only at that point.
| * device/trivial: split out nm_device_update_initial_hw_address()Beniamino Galvani2016-01-071-21/+29
| |
| * core: simplify generation of default connection for new devicesBeniamino Galvani2016-01-072-23/+5
|/ | | | | | | | | Instead of using a signal for triggering the generation of a default connection when the device becomes managed, let the manager wait for a transition to UNAVAILABLE or DISCONNECTED states. This partially reverts b3b0b4625053 ("device: retry creation of default connection after link is initialized").
* wifi: merge branch 'th/wifi-device-creation-bgo760154'Thomas Haller2016-01-064-70/+66
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=760154
| * wifi: refactor creation of NMDeviceWifi/NMDeviceOlpcMesh to initialize in ↵Thomas Haller2016-01-062-34/+13
| | | | | | | | constructed() method
| * wifi: don't fail construction of NMDeviceWifi in constructorThomas Haller2016-01-064-33/+40
| | | | | | | | | | | | | | | | | | | | | | We cannot abort the construction of a GLib object instance like we did for NMDeviceWifi and NMDeviceOlpcMesh when nm_platform_wifi_get_capabilities() failed. Instead, check the capabilities first (in the factory method) and only create the object instance when the device can be handled. https://bugzilla.gnome.org/show_bug.cgi?id=760154
| * wifi-olpc: refactor NMDeviceOlpcMesh to hold pointer to NMManagerThomas Haller2016-01-061-5/+15
| | | | | | | | | | Objects that register to a signal of a singleton should own a reference to the singleton to ensure the proper lifetime of the singleton upon shutdown.
| * wifi: use "bool" members instead of gboolean in NMDeviceWifiPrivate structThomas Haller2016-01-061-2/+2
|/
* merge: branch 'bg/helper-macros-bgo760149'Beniamino Galvani2016-01-0640-289/+128
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=760149
| * core: cache pointer to private-data in NMIP{4,6}Config structureBeniamino Galvani2016-01-064-12/+32
| | | | | | | | | | | | This is the same as 04c70c76bccf86a5870d957c35d4cff69ae5e558 for the NMIP4Config and NMIP6Config structures. The new field makes debugging of issues related to IP configuration much easier.
| * core: use NM_PLATFORM_GET instead of nm_platform_get() in function callsBeniamino Galvani2016-01-065-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacement was done with command: spatch --sp-file nm_platform_get.cocci --in-place --smpl-spacing --dir src where nm_platform_get.cocci contains: @@ identifier func; expression list args; @@ - func (nm_platform_get()) + func (NM_PLATFORM_GET) @@ identifier func; expression list args; @@ - func (nm_platform_get(), args) + func (NM_PLATFORM_GET, args)
| * core: use nm_clear_g_signal_handler() where possibleBeniamino Galvani2016-01-065-46/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacement was done with command: spatch --sp-file nm_clear_g_signal_handler.cocci --in-place --smpl-spacing --dir src where nm_clear_g_signal_handler.cocci contains: @@ expression obj, id; @@ - if (id) { - g_signal_handler_disconnect (obj, id); - id = 0; - } + nm_clear_g_signal_handler (obj, &id);
| * core: always use gulong to store signal handler idsBeniamino Galvani2016-01-0615-28/+28
| | | | | | | | | | | | | | | | | | | | We inconsistently use gulong,guint,int types to store signal handler id, but the type returned by g_signal_connect() is a gulong. This has no practical consequences because a int/guint is enough to store the value, however it is better to use a consistent type, also because nm_clear_g_signal_handler() accepts a pointer to the signal id and thus it must be always called with the same pointer type.
| * core,libnm: use nm_clear_g_source() where possibleBeniamino Galvani2016-01-0622-193/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacement was done with commands: spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir src spatch --sp-file nm_clear_g_source.cocci --in-place --smpl-spacing --dir libnm where nm_clear_g_source.cocci contains: @@ expression e; @@ - if (e) { - g_source_remove (e); - e = 0; - } + nm_clear_g_source (&e);
| * core: fix signedness of NMPolicyPrivate.reset_retries_idBeniamino Galvani2016-01-061-1/+1
|/
* ifcfg-rh: fix utils_detect_ifcfg_path() argumentBeniamino Galvani2016-01-061-1/+1
| | | | Fixes: 39e97c9339a189ce378a72025c05192fecbaf58b
* ifcfg-rh: only accept ifcfg base paths in impl_ifcfgrh_get_ifcfg_details()Thomas Haller2016-01-061-1/+11
| | | | | | | | | | | | | Previously, we directly passed the @in_ifcfg path to find_by_path(). That means, @in_ifcfg must be the path to the base "ifcfg-" file, not an alias or route file. Add an additional pre-check, that the provided file name is really a ifcfg base file. This results in a more detailed error message when calling GetIfcfgDetails not on the ifcfg base file. It's not that previously the lookup would have succeeded.
* device/infiniband: take interface down to set transport modeBeniamino Galvani2016-01-051-1/+4
| | | | | | | With some drivers it is necessary to take the interface down to set the transport mode. https://bugzilla.redhat.com/show_bug.cgi?id=1281301
* core: merge branch 'bg/ppp-device-fixes-rh1268617'Beniamino Galvani2016-01-052-3/+5
|\ | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1268617
| * device: update @ip_iface only if IP interface existsBeniamino Galvani2016-01-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If @ip_ifindex is zero, the IP interface has disappeared and there's no point in updating @ip_iface. Actually, unconditionally updating @ip_iface is dangerous because it breaks the assumption used by other functions (as nm_device_get_ip_ifindex()) that a non-NULL @ip_iface implies a valid @ip_ifindex. This was causing the scary failure: devices/nm-device.c:666:get_ip_iface_identifier: assertion failed: (ifindex) https://bugzilla.redhat.com/show_bug.cgi?id=1268617
| * ppp-manager: clear @ppp_watch_id upon pppd terminationBeniamino Galvani2016-01-051-0/+1
|/ | | | | | Set @ppp_watch_id to zero upon pppd termination, otherwise the call to g_source_remove(priv->ppp_watch_id) in dispose() could trigger a failed assertion.
* platform: ensure _nl_send_auto_with_seq() returns 0 on successThomas Haller2016-01-041-2/+3
| | | | Just for consistency reason.
* platform/trivial: remove extra indention in constructed()Thomas Haller2016-01-041-30/+28
|
* ppp-manager: initialize MTU to zero when not specifiedBeniamino Galvani2016-01-041-4/+5
| | | | | | | When the MTU was not specified in PPP setting, it got the value of a previous option. Fixes: 8f36727ac86ff47b97ffc0c856c1738f8322aa9b
* systemd: merge branch 'systemd' into masterThomas Haller2016-01-0475-537/+1076
|\
| * systemd: update code from upstreamThomas Haller2016-01-0470-426/+1057
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2016-01-04, git commit 993898a2af5bc34e600b81aafec055cc93be0b02. ====== SYSTEMD_DIR=../systemd COMMIT=993898a2af5bc34e600b81aafec055cc93be0b02 ( 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/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/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.h" nm_copy_sd "src/basic/sparse-endian.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-internal.c" nm_copy_sd "src/libsystemd-network/lldp-network.h" nm_copy_sd "src/libsystemd-network/lldp-network.c" nm_copy_sd "src/libsystemd-network/lldp-port.c" nm_copy_sd "src/libsystemd-network/lldp-port.h" nm_copy_sd "src/libsystemd-network/lldp-tlv.c" nm_copy_sd "src/libsystemd-network/lldp-tlv.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-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"
* | platform/tests: avoid test failure in test_ip6_address_general()Thomas Haller2016-01-041-0/+3
| | | | | | | | | | # Start of ipv6 tests # NetworkManager-FATAL-ERROR: NMPlatformSignalAssert: ../../../../../src/platform/tests/test-address.c:154, test_ip6_address_general(): failure to free non-accepted signal: ip6-address-changed-changed ifindex 11 (1 times received)
* | device: reset the capabilities to class defaults when reseting themLubomir Rintel2016-01-041-0/+2
| | | | | | | | | | | | Otherwise the lacking IS_SOFTWARE capability may cuase the connections not to be available on software devices and the devices would get garbage-collected at the end of unrealize().
* | vlan: make connection available if the device is not realLubomir Rintel2016-01-041-0/+13
| | | | | | | | | | Otherwise NMDevice would do and always fail a carrier check, making it impossible to ever manually activate a vlan connection.
* | libnm: merge branch 'th/libnm-test-invalid-connection'Thomas Haller2015-12-2669-683/+1459
|\ \
| * | libnm/tests: add tests for libnm handling invalid connectionsThomas Haller2015-12-262-0/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test showing how libnm/libnm-glib handles invalid connections, i.e. connections that fail nm_connection_verify(). libnm implements settings a static types (via different NMSetting types). This makes it unavoidable that eventually a newer server version will expose connections that fail verification in the client. For example, master added a new base type NMSettingTun. This setting type was not backported to legacy libnm-glib, thus such connection will not verify. Also, we want that newer server versions are backward compatible with older library versions. Thus also a pre-NMSettingTun libnm version has the same problem. The test shows that libnm is agnostic to whether the connection verifies. That is consistent behavior, but possibly problematic because most accessors to connections assert against a valid connection. Thus using the common nm_connection*() functions on an invalid connection can lead to problems. Also, due to the static nature of our NMSetting types, some properties can be silently dropped and thus mangling the connection without the library user noticing. libnm-glib prints a g_warning() whenever parsing an invalid connection. When an invalid connection is added initially, it is exposed to the library user. When a connection gets later invalidated due to an update, the connection disappears and it stays missing even if a subsequent update makes the connection valid again. libnm-glib's behavior indicates that we might wanted to hide invalid connections from the user. But it's very broken there.
| * | libnm-glib: avoid use-after-free when replace_settings() failsThomas Haller2015-12-261-0/+7
| | | | | | | | | | | | | | | | | | When replace_settings() fails, it emits the REMOVED signal. That in turn can free the self instance. Ensure to keep the instance alive long enough.
| * | libnm/tests: add test code driving python test serviceThomas Haller2015-12-262-0/+179
| | |