summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * platform: request link after deleting inifiniband partitionThomas Haller2016-04-201-24/+36
| | | | | | | | | | After issuing the sysctl "delete_child", we must request the link to get the platform cache in sync.
| * platform: stack allocate string buffers in _infiniband_partition_action()Thomas Haller2016-04-201-7/+7
| |
| * platform: use nm_utils_new_infiniband_name()Thomas Haller2016-04-203-17/+18
| |
| * core: add nm_utils_new_infiniband_name() utilThomas Haller2016-04-202-0/+28
| |
| * platform: preserve errno in nm_platform_sysctl_set()Thomas Haller2016-04-201-9/+31
| | | | | | | | | | We want to preserve the relevant errno during nm_platform_sysctl_set(). Also, if the final close() fails, fail altogether.
| * platform: restrict valid p_key for infiniband partitionsThomas Haller2016-04-202-1/+7
|/
* libnm/vpn-service-plugin: don't register a bus name before creating the VPN ↵Lubomir Rintel2016-04-201-13/+13
| | | | | | | | | | object Otherwise NetworkManager can be too fast calling a method: <error> [1461073999.2362] vpn-connection[0x7fe39ec491e0,be049803-a705-438f-b8f5-49db87640c93,"libreswan",0]: plugin NeedSecrets request #1 failed: No such interface 'org.freedesktop.NetworkManager.VPN.Plugin' on object at path /org/freedesktop/NetworkManager/VPN/Plugin
* platform: avoid using the nm_platform_link_*() getters excessivelyLubomir Rintel2016-04-201-6/+8
| | | | Thomas thinks it's a sin.
* infiniband: remove the partitions on unrealizingLubomir Rintel2016-04-203-8/+48
| | | | | | The infiniband drivers don't implement the rtnetlink link deletions. Therefore we unrealize the NMDevice instance but the backing resources stay around, preventing us from ever realizing the device again.
* platform: add functionality to remove infiniband partitionsLubomir Rintel2016-04-204-18/+87
|
* libnm-core: empty key is not a pkcs12 fileLubomir Rintel2016-04-202-0/+6
| | | | | | nmcli> set 802-1x.ca-cert file:///tmp/certs/eaptest_ca_cert.pem (process:31015): libnm-CRITICAL **: crypto_is_pkcs12_data: assertion 'data != NULL' failed Error: failed to set 'ca-cert' property: PEM certificate had no start tag '-----BEGIN CERTIFICATE-----'.
* examples: fix crash in add-connection-libnmBeniamino Galvani2016-04-201-1/+1
| | | | Reported-by: Ali Nematollahi <alirezan1@gmail.com>
* Revert "core: don't leak ActiveConnection object on AddAndActivate failure"Dan Williams2016-04-191-1/+0
| | | | | | This reverts commit 8b6a1ac62f2cb39b1246d7dff3525b1a8bb48f2c. Original patch was in error; 'active' is already gs_unref_object.
* libnm/vpn: search VPN plugin in NMPLUGINDIRThomas Haller2016-04-195-77/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit ca000cffbb9ef20c6dd965283df3f1babf0a7745, we changed to accept a plugin library name without path. One reason for that is to keep architecture dependent parts out of the .name file and possibly support multilib. However, the shared libraries of VPN plugins are not installed in a global library search path, but for example into "/usr/lib64/NetworkManager/libnm-vpn-plugin-openvpn.so". In that case, specifying "plugin=libnm-vpn-plugin-openvpn.so" would not be enough to find plugin. Instead, when configuring a plugin name without path, assume it is in NMPLUGINDIR directory. Modify nm_vpn_editor_plugin_load_from_file() to allow path-less plugin-names. Previously such names would be rejected as not being absolute. This API allows to do file verification before loading the plugin, but it now supports prepending NMPLUGINDIR to the plugin name. Basically, this function mangles the plugin_name argument and checks that such a file exists. The recently added nm_vpn_editor_plugin_load() continues to behave as before: it does no checks whatsoever and passes the name directly to dlopen(). That way, it uses system search paths like LD_LIBRARY_PATH and performs no checks on the file. Fixes: ca000cffbb9ef20c6dd965283df3f1babf0a7745
* libnm/vpn: merge branch 'th/vpn-load-plugin-bgo765225'Thomas Haller2016-04-1910-91/+185
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=765225
| * libnm/vpn: add nm_vpn_editor_plugin_load() functionThomas Haller2016-04-193-1/+51
| | | | | | | | | | | | Contrary to nm_vpn_editor_plugin_load_from_file(), this allows to specify a library name without path. In this case, g_module_open() (dlopen()) will search for a library in various system directories.
| * libnm/vpn: allow specifying non-absolute plugin name in VPN .name fileThomas Haller2016-04-193-39/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 3dfbbb227e82b47973f612b6b031d8d591727436, we enforce that the plugin path in the .name file is absolute and we perform several checks on the file before loading it (ownership, etc). Relax that, to also allow libray names without path component. In that case, g_module_open()/dlopen() will search for a library in various search paths. This allows, to omit absolute paths in the .name file. The latter is problematic, because by default we install the .name file in the architecture independent location /usr/lib/NetworkManager. As such, it should not contain paths to architecture dependent libraries. With this change, a .name file can contain only the library name and it will be loaded using the usual mechanism. However, specifying absolute paths is still possible and works same as before, including checking file permissions. As such, distributions probably should package the VPN plugins to have no path in the .name file. On the other hand, a user compiling from source probably wants to specify an absolute path. The reason is, that the user probably doesn't build the plugin for multiple achitectures and that way, he can install the plugin in a separate (private) prefix.
| * libnm/vpn: fix code comment for nm_vpn_editor_plugin_load_from_file()Thomas Haller2016-04-191-5/+1
| | | | | | | | | | | | | | The @plugin_filename argument must be an absolute path. That was changed later, but forgot to update the comment. Fixes: 3dfbbb227e82b47973f612b6b031d8d591727436
| * libnm/vpn: clear internal "keyfile" from NMVpnPluginInfoThomas Haller2016-04-191-4/+6
| | | | | | | | | | The GKeyFile is no longer needed after constuction. All strings are copied over to the "keys" hash.
| * libnm/vpn: lookup nm_vpn_plugin_info_supports_multiple() from cached valuesThomas Haller2016-04-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of looking into the keyfile, lookup the "supports-multiple-connections" setting in the "keys" hash. This has some behavioral difference: - g_key_file_get_boolean() first does g_key_file_get_value(), and then converts the string using the private g_key_file_parse_value_as_boolean() function -- which is case-sensitive, accepts "true|false|0|1" and considers only the text until the first whitespace. - now, we put g_key_file_get_string() into the cache "keys" and parse it with _nm_utils_ascii_str_to_bool(). The latter is case insensitive, allows also "yes|no|on|off", strips whitespaces. However, the difference is subtle and shouldn't matter. The point of this change is to free "keyfile" after construction.
| * shared: move nm_utils_ascii_str_to_bool() to shared/nm-shared-utils.hThomas Haller2016-04-195-40/+38
|/
* device: check for a parent deviceLubomir Rintel2016-04-193-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | The device creation can be attempted if the name can be determined. It alone is doesn't mean that there's a parent device -- the name could just have been hardcoded in the connection. NetworkManager[21519]: nm_device_get_ifindex: assertion 'NM_IS_DEVICE (self)' failed Program received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x5555557fb2e5 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd3d0) at gmessages.c:1046 1046 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth)); (gdb) bt #0 0x00007ffff4ec88c3 in g_logv (log_domain=0x5555557fb2e5 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd3d0) at gmessages.c:1046 #1 0x00007ffff4ec8a3f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1079 #2 0x00005555555d2090 in nm_device_get_ifindex (self=0x0) at devices/nm-device.c:562 #3 0x00005555555ef77a in nm_device_supports_vlans (self=0x0) at devices/nm-device.c:9865 #4 0x00005555555bf2f9 in create_and_realize (device=0x555555c549b0 [NMDeviceVlan], connection=0x555555b451e0, parent=0x0, out_plink=0x7fffffffd5f8, error=0x7fffffffd700) at devices/nm-device-vlan.c:225 #5 0x00005555555d5757 in nm_device_create_and_realize (self=0x555555c549b0 [NMDeviceVlan], connection=0x555555b451e0, parent=0x0, error=0x7fffffffd700) at devices/nm-device.c:1783 #6 0x0000555555688601 in system_create_virtual_device (self=0x555555af51c0 [NMManager], connection=0x555555b451e0) at nm-manager.c:1120 #7 0x000055555568894e in connection_changed (settings=0x555555ae8220 [NMSettings], connection=0x555555b451e0, manager=0x555555af51c0 [NMManager]) at nm-manager.c:1172 #8 0x0000555555693448 in nm_manager_start (self=0x555555af51c0 [NMManager], error=0x7fffffffda30) at nm-manager.c:4466 #9 0x00005555555d166f in main (argc=1, argv=0x7fffffffdba8) at main.c:454 (gdb) Fixes: 332994f1b19ded7cb343ef573443916bab05aaec
* infiniband: check that the connection to be created is a partition firstLubomir Rintel2016-04-191-7/+8
| | | | | No functional change. It will make it a bit easier to produce a good error message in subsequent commit.
* infiniband: consistently use the error codeLubomir Rintel2016-04-191-3/+3
| | | | Only report CREATION_FAILED when we did actually attempt creation.
* macvlan: fix error handlingLubomir Rintel2016-04-191-1/+2
|
* merge: merge branch 'systemd' into masterThomas Haller2016-04-1916-97/+241
|\
| * systemd: update code from upstreamThomas Haller2016-04-1915-94/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git on 2016-04-19, git commit 490d20e65dd85628f910299a3925bbff466b2e74. ====== SYSTEMD_DIR=../systemd COMMIT=490d20e65dd85628f910299a3925bbff466b2e74 ( 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/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/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"
* | team: merge branch 'bg/team-conf-check-rh1294728'Beniamino Galvani2016-04-1811-17/+354
|\ \ | | | | | | | | | | | | | | | Improve the assumption logic for team devices. https://bugzilla.redhat.com/show_bug.cgi?id=1294728
| * | libnm-core: use jansson to compare and check team configurationsBeniamino Galvani2016-04-188-13/+345
| | | | | | | | | | | | | | | Optionally link libnm-core against jansson JSON library and use it to validate and compare team configurations.
| * | device/team: always try to connect to teamd in update_connection()Beniamino Galvani2016-04-181-4/+7
| | | | | | | | | | | | | | | | | | | | | update_connection() may be called during startup when the bus watch hasn't notified yet the presence (or absence) of the teamd service on the bus. Try to obtain a connection to the service in order to retrieve the current configuration.
| * | contrib/fedora: add dependency on janssonBeniamino Galvani2016-04-182-0/+2
|/ /
* | device-factory: always prefer manually set interface name to a generated oneLubomir Rintel2016-04-181-3/+2
| | | | | | | | | | | | | | | | | | If the connection specifies an interface name, it should never attach to a device of a different name even if the factory thinks the connection is compatible with the device. This fixes an issue that caused the inifniband connections to attach to different devices or partitions.
* | libnm-core/vpn-connection: get the service for bus path from pluginLubomir Rintel2016-04-181-1/+4
| | | | | | | | | | ...not from the connection. Otherwise the o.fdo.NM.openswan connection would try to use a name they're not allowed to use.
* | linux-platform: fix crash in _new_from_nl_link() when sharing lnk dataThomas Haller2016-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to reuse an existing (equal) lnk-data from the cache. NetworkManager[20977]: <debug> [1460993609.1427] platform: signal: link added: 11: qib_ib0.8002@4 <UP,LOWER_UP;broadcast,multicast,up,running,lowerup> mtu 65520 arp 32 infiniband? not-init addrgenmode eui64 addr 80:00:00:11:FE:80:00:00:00:00:00:00:00:11:75:00:00:6F:33:DE driver ib_ipoib ... NetworkManager[20977]: <debug> [1460993609.1467] platform-linux: do-request-link: 11 NetworkManager[20977]: nmp_object_ref: assertion 'NMP_OBJECT_IS_VALID (obj)' failed Program received signal SIGTRAP, Trace/breakpoint trap. g_logv (log_domain=0x55555583dcce "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffc8e0) at gmessages.c:1046 1046 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth)); (gdb) bt #0 0x00002aaaad94b8c3 in g_logv (log_domain=0x55555583dcce "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffc8e0) at gmessages.c:1046 #1 0x00002aaaad94ba3f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1079 #2 0x00005555557863be in nmp_object_ref (obj=0x0) at platform/nmp-object.c:210 #3 0x0000555555624c0e in event_handler_recvmsgs (id_only=<optimized out>, nlh=<optimized out>, cache=<optimized out>, platform=<optimized out>) at platform/nm-linux-platform.c:1568 #4 0x0000555555624c0e in event_handler_recvmsgs (id_only=<optimized out>, msg=0x555555b0ebf0, cache=<optimized out>, platform=<optimized out>) at platform/nm-linux-platform.c:1923 #5 0x0000555555624c0e in event_handler_recvmsgs (handle_events=<optimized out>, msg=0x555555b0ebf0, platform=<optimized out>) at platform/nm-linux-platform.c:3656 #6 0x0000555555624c0e in event_handler_recvmsgs (platform=platform@entry=0x555555b00980 [NMLinuxPlatform], handle_events=handle_events@entry=1) at platform/nm-linux-platform.c:5886 #7 0x0000555555626857 in event_handler_read_netlink (platform=platform@entry=0x555555b00980 [NMLinuxPlatform], wait_for_acks=wait_for_acks@entry=0) at platform/nm-linux-platform.c:5942 #8 0x0000555555627093 in do_request_link_no_delayed_actions (platform=platform@entry=0x555555b00980 [NMLinuxPlatform], ifindex=ifindex@entry=11, name=name@entry=0x0) at platform/nm-linux-platform.c:3480 #9 0x00005555556273d6 in delayed_action_handle_all (ifindex=11, platform=0x555555b00980 [NMLinuxPlatform]) at platform/nm-linux-platform.c:2918 #10 0x00005555556273d6 in delayed_action_handle_all (platform=0x555555b00980 [NMLinuxPlatform]) at platform/nm-linux-platform.c:3003 #11 0x00005555556273d6 in delayed_action_handle_all (platform=0x555555b00980 [NMLinuxPlatform], read_netlink=<optimized out>) at platform/nm-linux-platform.c:3029 #12 0x000055555562a33f in constructed (_object=<optimized out>) at platform/nm-linux-platform.c:6241 #13 0x00002aaaad6c0292 in g_object_new_internal (class=class@entry=0x555555b12ef0, params=params@entry=0x7fffffffd660, n_params=2) at gobject.c:1814 #14 0x00002aaaad6c21d4 in g_object_new_valist (object_type=object_type@entry=93824998249472, first_property_name=first_property_name@entry=0x55555580629e "register-singleton", var_args=var_args@entry=0x7fffffffd7b0) at gobject.c:2034 #15 0x00002aaaad6c25d1 in g_object_new (object_type=93824998249472, first_property_name=0x55555580629e "register-singleton") at gobject.c:1617 #16 0x00005555555d1798 in main (argc=1, argv=0x7fffffffda58) at main.c:446 Fixes: db5d00d396289fe882847ee904fc57e1b6dc77fd
* | dns-manager: properly handle multiple VPN configurationsbg/dns-manager-vpn-bgo764689Beniamino Galvani2016-04-181-53/+53
| | | | | | | | | | | | | | | | | | | | | | Now that we support multiple VPNs active at the same time, the DNS manager must be able to keep a list of all the VPN configurations and give them a higher priority than other configurations. Before this commit all the VPN configuration except one were considered as normal configurations. https://bugzilla.gnome.org/show_bug.cgi?id=764689
* | dns-manager: add 'priv' pointer to object structureBeniamino Galvani2016-04-182-6/+11
| |
* | man: add missing comma in NetworkManager.xml 'see also' sectionBeniamino Galvani2016-04-161-1/+1
| |
* | dns: fix debug messageBeniamino Galvani2016-04-151-2/+2
| | | | | | | | Fixes: 5f9d348c2019753712ff7444e3a8ae5ac3f38dda
* | device: merge branch 'th/device-update-default-route'Thomas Haller2016-04-151-20/+43
|\ \
| * | device: fix preserving the default-route during _cleanup_generic_post()Thomas Haller2016-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | When we want to preserve the default-route on cleanup, we must first set it to assumed, before clearing it. Otherwise, NMDefaultRouteManager's update() will delete the default route. This is the oposite of the deconfigure case, where we first set it to !has && !assumed, to force the route-manager to delete the route.
| * | device: refactor clearing default-route in NMDeviceThomas Haller2016-04-151-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add a function _update_default_route() to set the default_route flags and call update() in one step. Also, if there are no changes, skip the call to NMDefaultRouteManager's update().
| * | device: fix wrongly deleting default-route on exitThomas Haller2016-04-151-2/+11
|/ / | | | | | | | | | | | | | | | | We must preserve the default-route on shutdown. Thus it must first be announced as "assumed", and only removed in a second step. Fixes: 9498ea507eb1d5042736c4351337e91b9c13bdf6
* | tui: return to initial menu after sub-forms exitBeniamino Galvani2016-04-157-30/+33
| | | | | | | | | | | | | | | | | | | | When the user runs nmtui and selects an operation (edit, connect or set-hostname) from the initial menu, the expectation is that once the operation terminates the initial menu is shown again, so that the user can perform multiple operations (like creating a connection and activating it) without quitting. https://bugzilla.gnome.org/show_bug.cgi?id=763836
* | dns: update caching plugins on configuration change signalBeniamino Galvani2016-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A HUP or USR1 signal forces the rewrite of DNS configuration, however caching plugins are ignored when using dns=dnsmasq and so the real servers are written to resolv.conf: $ cat /etc/resolv.conf nameserver 127.0.0.1 # killall -USR1 NetworkManager $ cat /etc/resolv.conf nameserver 192.168.1.1 Set @no_caching to FALSE when calling update_dns() after a signal to take caching plugins into account.
* | device: apply MTU setting also to devices without IPv4 configurationBeniamino Galvani2016-04-141-1/+40
| | | | | | | | | | | | | | | | | | | | Usually the MTU in the ethernet.mtu property is applied to the device during the commit of IPv4 configuration. For devices with ipv4.method=disabled or slave devices that phase is skipped and so the setting does not have effect. Apply the MTU explicitly in such cases. https://bugzilla.redhat.com/show_bug.cgi?id=1303968 https://bugzilla.redhat.com/show_bug.cgi?id=1303731
* | device/vlan: update hw address also during prepare phaseBeniamino Galvani2016-04-141-21/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware address of a VLAN must be kept aligned with the one of its parent device, and we already used a signal in NMDeviceVlan to catch changes in parent address and update the VLAN device accordingly. But this didn't work in all cases because the change might happen after the VLAN gets created but before we register the signal, so it is necessary to add further checks to enforce the alignment during the device activation. https://bugzilla.redhat.com/show_bug.cgi?id=1325752
* | vpn-connection: don't fail the connection if there's no VPN gatewayLubomir Rintel2016-04-141-8/+6
| | | | | | | | | | | | | | The stongswan charon_nm plugin doesn't send a gateway. The logic was accidentally broken with GDBus port. Fixes: 231b0390a5a3620025abcfdfcac94de2ecbc065a
* | core: merge branch 'th/settings-cleanup-bgo765000'Thomas Haller2016-04-1411-523/+510
|\ \ | | | | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=765000
| * | active-connection: update D-Bus properties of active-connection when ↵Thomas Haller2016-04-141-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | settings-connection changes $ nmcli connection up my-connection Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/42) $ nmcli connection modify my-connection connection.id other-name $ nmcli -f connection.id connection show other-name connection.id: other-name $ nmcli -f GENERAL.CONNECTION device show enp0s25 GENERAL.CONNECTION: my-connection $ nmcli connection down other-name Error: 'other-name' is not an active connection. Error: no active connection provided. $ nmcli connection down my-connection Connection 'my-connection' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/13) When modifying a connection, NMActiveConnection must update the D-Bus properties that belong to the settings-connection.
| * | settings: merge "connection-updated" and "connection-updated-by-user" signalsThomas Haller2016-04-144-67/+52
| | | | | | | | | | | | | | | | | | This is mostly interesting of NMPolicy, which no longer needs to subscribe to two almost identical signals (where the by-user signal was always invoked together with the plain "updated" signal).