summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* core: autoconnect fixes for default-unmanaged devices and property notificationdcbw/unmanaged-availableDan Williams2014-10-232-8/+62
| | | | | | | | | | | | | | | | | Previously the only thing preventing default-unmanaged devices from being auto-activated was luck and the fact that they didn't have any available connections when in the UNMANAGED state. That's no longer true, so we must be more explicit about their behavior. Furthermore it makes no sense to allow default-unmanaged devices to set priv->autoconnect=TRUE since that is never supposed to happen, so enforce that both in NM itself and if the change request comes in over the D-Bus interface. Lastly, internal priv->autoconnect=TRUE changes never emitted a property change notification, meaning the NMPolicy would never schedule an autoconnect check if the device's priv->autoconnect was set to TRUE as a result of re-activating or waking from sleep.
* core: loosen master device carrier check before IP configurationDan Williams2014-10-231-6/+6
| | | | | | | | | | | | | | | | Previously a master device would wait for a carrier before starting IP configuration only for 'manual' connections, but that's not quite broad enough. We also want to allow SHARED methods to proceed immediately since they are also effectively static/manual configuration. Use the newly split out methods for checking whether a connection requires a carrier or not to allow the SHARED method to proceed for master devices without a carrier. For example, this allows bridge configurations with tun/tap ports to set up SHARED addressing before the tun/tap gets a carrier which only happens when something opens the other side of the tun/tap (like the VM or container).
* trivial: move connection_requires_carrer() upDan Williams2014-10-231-73/+73
| | | | No code change, only move above a future user.
* core: refactor connection_requires_carrier() to split out method checkingDan Williams2014-10-231-15/+38
| | | | The split out functions will be used next for master/slave decisions.
* core: use _nm_utils_string_in_list() instead of private functionDan Williams2014-10-231-14/+5
|
* core: shared connections don't require a carrierDan Williams2014-10-231-1/+2
| | | | | They are effectively static connections since the address is manually assigned, so they do not require a carrier.
* core: allow default unmanaged devices to have available connections when ↵Dan Williams2014-10-231-3/+11
| | | | | | | | | unmanaged Default unmanaged devices become managed when the user explicitly activated a connection on the device, but the user can't do that unless the device has some available connections. Fix things up so that default unmanaged devices can have available connections.
* ibft: fix uninitialized variableDan Williams2014-10-231-1/+1
|
* core: add PrimaryConnectionType property to NMManager (bgo #739080)Ryan Lortie2014-10-233-0/+27
| | | | | | | | | | | | | | | | | | | | This will provide an extremely easy way for applications to find out what type of connection the system is currently using. They might want to do this to avoid using data if a phone is on a 3G connection, for example. Having this as a separate property provides at least two advantages: 1) it reduces code complexity for those wanting only this one simple piece of information 2) we could allow access to this property (but nothing else) to privilege-separated applications in the future This patch adds the missing nm_active_connection_get_connection_type() which was in the header file but never actually implemented. https://bugzilla.gnome.org/show_bug.cgi?id=739080
* wwan: fix wwan-exports.verDan Winship2014-10-221-1/+0
|
* core: Remove use of NM_SESSION_MONITOR_ERROR domainLubomir Rintel2014-10-221-24/+21
| | | | | | | | It no longer exists. Also, the special case of ENOENT handling in nm-session-monitor-ck is removed; it's not worth keeping it around just to print a log message when the error is ignored nayway.
* core: drop all remaining core-internal error domainsDan Winship2014-10-2217-215/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | A number of classes in core had their own error domains that aren't really necessary. In the case of NMDcbError, NMDhcpManagerError, NMDnsManagerError, NMDnsmasqManagerError, NMPppManagerError, and NMSessionMonitorError, most of the codes they defined weren't even being used, and at any rate, the errors were always returned into contexts where they would just have their message extracted and then get thrown away without anyone ever looking at the domain or code. So all uses of those domains can just be replaced with NM_MANAGER_ERROR_FAILED without any loss of information. NMAuthManagerError only had 1 error code, and it just indicated "something went wrong", so it can be replaced with NM_MANAGER_ERROR_FAILED without loss of information. (nm-auth-manager.c has also been fixed to return NM_MANAGER_ERROR_FAILED when the CheckAuthorization D-Bus call fails, rather than returning whatever error domain/code the D-Bus call returned.) NMVpnManagerError used 2 of its 4 error codes, and they could actually end up getting returned across D-Bus in some cases. But there are NMManagerError codes that are semantically similar enough to make the NMVpnManagerError ones unnecessary.
* libnm-core, settings: move NMAgentManagerError to nm-errorsDan Winship2014-10-223-31/+6
| | | | | Move the definition of NMAgentManagerError to nm-errors, register it with D-Bus, and verify in the tests that it maps correctly.
* settings: drop plugin-specific error domainsDan Winship2014-10-2239-559/+271
| | | | | | Each plugin defined its own error domain, though none actually defined any errors. Replace these with appropriate uses of NM_SETTINGS_ERROR_INVALID_CONNECTION and NM_SETTINGS_ERROR_FAILED.
* libnm-core, settings: move NMSettingsError to nm-errorsDan Winship2014-10-229-110/+16
| | | | | | | | | Move the definition of NMSettingsError to nm-errors, register it with D-Bus, and verify in the tests that it maps correctly. Remove a few unused error codes, simplify a few others, and rename GENERAL to FAILED and HOSTNAME_INVALID to INVALID_HOSTNAME, for consistency.
* libnm-core, core: merge NMLoggingError into NMManagerErrorDan Winship2014-10-223-24/+3
| | | | | | | NMManagerError has other operation-specific errors (like NM_MANAGER_ERROR_ALREADY_ASLEEP_OR_AWAKE), so it makes sense to move NM_LOGGING_ERROR_UNKNOWN_LEVEL and NM_LOGGING_ERROR_UNKNOWN_DOMAIN there too rather than having them in their own tiny error domain.
* libnm-core, core: move NMManagerError to nm-errorsDan Winship2014-10-222-37/+9
| | | | | | | | | | | | | | | | | Move the definition of NMManagerError to nm-errors, register it with D-Bus, and verify in the tests that it maps correctly. NM_MANAGER_ERROR_INTERNAL gets renamed to NM_MANAGER_ERROR_FAILED for consistency. NM_MANAGER_ERROR_UNMANAGED_DEVICE is dropped since that name doesn't really describe the one place it was previously used in. NM_MANAGER_ERROR_SYSTEM_CONNECTION is dropped because it was't being used. NM_MANAGER_ERROR_UNSUPPORTED_CONNECTION_TYPE is dropped because it can be replaced with an NM_CONNECTION_ERROR. NM_MANAGER_ERROR_AUTOCONNECT_NOT_ALLOWED is turned into the more generic NM_MANAGER_ERROR_CONNECTION_NOT_AVAILABLE. Also, remove the <tp:possible-errors> sections from nm-manager.xml, since they were completely out of date.
* devices: drop device-type-specific error domainsDan Winship2014-10-2223-295/+54
| | | | | | Most NMDevice types defined their own error domain but then never used it. A few did use their errors, but some of those errors are redundant with NMDeviceError, and others can be added to it.
* libnm-core, libnm, devices: merge client and daemon NMDeviceErrorDan Winship2014-10-222-23/+2
| | | | | | | | | | | | | | Merge libnm's NMDeviceError and the daemon's NMDeviceError into a single enum (in nm-errors.h). Register the domain with D-Bus, and add a test that the client side decodes it correctly. The daemon's NM_DEVICE_ERROR_CONNECTION_INVALID gets absorbed into libnm's NM_DEVICE_ERROR_INVALID_CONNECTION, and NM_DEVICE_ERROR_UNSUPPORTED_DEVICE_TYPE gets dropped, since it was only returned from one place, which is now using NM_DEVICE_ERROR_FAILED, since (a) it ought to be a "can't happen", and (b) the only caller of that function just logs error->message and then frees the error without ever looking at the code.
* libnm-core, core: register NMConnectionError with D-BusDan Winship2014-10-221-3/+3
| | | | | | Register NMConnectionError with D-Bus on both sides, so that, eg, connection validation failures in the daemon will translate to the correct error codes in the client.
* libnm-core: merge NMSetting*Error into NMConnectionErrorDan Winship2014-10-229-221/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each setting type was defining its own error type, but most of them had exactly the same three errors ("unknown", "missing property", and "invalid property"), and none of the other values was of much use programmatically anyway. So, this commit merges NMSettingError, NMSettingAdslError, etc, all into NMConnectionError. (The reason for merging into NMConnectionError rather than NMSettingError is that we also already have "NMSettingsError", for errors related to the settings service, so "NMConnectionError" is a less-confusable name for settings/connection errors than "NMSettingError".) Also, make sure that all of the affected error messages are localized, and (where appropriate) prefix them with the relevant property name. Renamed error codes: NM_SETTING_ERROR_PROPERTY_NOT_FOUND -> NM_CONNECTION_ERROR_PROPERTY_NOT_FOUND NM_SETTING_ERROR_PROPERTY_NOT_SECRET -> NM_CONNECTION_ERROR_PROPERTY_NOT_SECRET Remapped error codes: NM_SETTING_*_ERROR_MISSING_PROPERTY -> NM_CONNECTION_ERROR_MISSING_PROPERTY NM_SETTING_*_ERROR_INVALID_PROPERTY -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_ERROR_PROPERTY_TYPE_MISMATCH -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_INVALID_SETTING NM_SETTING_BOND_ERROR_INVALID_OPTION -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_BOND_ERROR_MISSING_OPTION -> NM_CONNECTION_ERROR_MISSING_PROPERTY NM_SETTING_CONNECTION_ERROR_TYPE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_MISSING_SETTING NM_SETTING_CONNECTION_ERROR_SLAVE_SETTING_NOT_FOUND -> NM_CONNECTION_ERROR_MISSING_SETTING NM_SETTING_IP4_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_IP6_CONFIG_ERROR_NOT_ALLOWED_FOR_METHOD -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_VLAN_ERROR_INVALID_PARENT -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_WIRELESS_SECURITY_ERROR_MISSING_802_1X_SETTING -> NM_CONNECTION_ERROR_MISSING_SETTING NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_802_1X -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_WIRELESS_SECURITY_ERROR_LEAP_REQUIRES_USERNAME -> NM_CONNECTION_ERROR_MISSING_PROPERTY NM_SETTING_WIRELESS_SECURITY_ERROR_SHARED_KEY_REQUIRES_WEP -> NM_CONNECTION_ERROR_INVALID_PROPERTY NM_SETTING_WIRELESS_ERROR_CHANNEL_REQUIRES_BAND -> NM_CONNECTION_ERROR_MISSING_PROPERTY Dropped error codes (were previously defined but unused): NM_SETTING_CDMA_ERROR_MISSING_SERIAL_SETTING NM_SETTING_CONNECTION_ERROR_IP_CONFIG_NOT_ALLOWED NM_SETTING_GSM_ERROR_MISSING_SERIAL_SETTING NM_SETTING_PPP_ERROR_REQUIRE_MPPE_NOT_ALLOWED NM_SETTING_PPPOE_ERROR_MISSING_PPP_SETTING NM_SETTING_SERIAL_ERROR_MISSING_PPP_SETTING NM_SETTING_WIRELESS_ERROR_MISSING_SECURITY_SETTING
* libnm-core: drop nm_setting_lookup_type_by_quark()Dan Winship2014-10-223-11/+6
| | | | | | | | | | | | nm_setting_lookup_type_by_quark() was only ever used in places that were still mistakenly assuming the old style of nm_connection_verify() errors, where the error message would contain only a property name and no further explanation. Fix those places to assume that the error will contain a real error message, and include both the setting name and the property name. Given that, there's no longer any need for nm_setting_lookup_type_by_quark(), so drop it.
* core: let kernel add IPv6LL address when method=ignore (rh #1132938)Dan Williams2014-10-211-1/+15
| | | | | | | | | The IPv6LL address handling in userspace patches failed to handle the case where the IPv6 method was 'ignore'. Previously the kernel would usually add the IPv6LL address itself, but if NM has turned off kernel IPv6LL then obviously this wouldn't happen. So when the method is 'ignore', turn off userspace IPv6LL handling and bounce disable_ipv6 to make the kernel add the IPv6LL address if it wants to.
* settings: pass valid error domain to g_set_error() in load_plugins()Thomas Haller2014-10-211-3/+3
| | | | | | glib asserts that the error domain parameter is a non-zero quark. Signed-off-by: Thomas Haller <thaller@redhat.com>
* rdisc,device: set MTU if an appropriate option is present in a RALubomir Rintel2014-10-203-0/+24
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=738104 Reported-by: Charles R. Anderson <cra@wpi.edu>
* core: track origin of MTULubomir Rintel2014-10-2010-16/+31
| | | | | Only override MTU if it came from a source of higher priority or is of equal priority but of lower value.
* core: Move NMPlatformSource to nm-types.hLubomir Rintel2014-10-2019-192/+189
| | | | | ...and rename it while at it. It's going to be useful outside nm-platform, to weight MTU options from various sources.
* core: lie about NMActiveConnection:state in new connectionsDan Winship2014-10-191-1/+10
| | | | | | | | | | | | NMActiveConnections start out in state "unknown", but then quickly switch to "activating". Unfortunately, it's sometimes possible for this to be externally visible. Fix this by lying and saying that state is "activating" during the initial "unknown" stage (though not if the state changes to "unknown" later on). (Actually changing the initial state to "activating" breaks things because some code depends on there being a transition into the "activating" state.)
* core: ensure interface is up before applying IP configuration (bgo #738479)Dan Williams2014-10-171-5/+16
| | | | | | | | Routing configuration fails to apply if the device is not IFF_UP, so if we're going to apply IP configuration to the device, make sure it's IFF_UP first. https://bugzilla.gnome.org/show_bug.cgi?id=738479
* core: remove child devices without deconfiguring them (bgo #738479)Dan Williams2014-10-171-8/+10
| | | | | | | | | | When a child device is found and an IP configuration already exists for it even though it is under NM control (like when pppd applies IP config to a WWAN device before NM gets the IP details from the pppd plugin), don't deconfigure the child device when removing it from the device list, because this breaks the device's configuration. https://bugzilla.gnome.org/show_bug.cgi?id=738479
* core: don't override external route metrics (bgo #738268)Dan Williams2014-10-171-4/+12
| | | | | | | | | | | | | | | A generated connection contains a copy of the device's existing configuration, so it's entirely redundant to merge the connection back into the device's IP config. But even though that should result in no changes to the IP config, NMSettingIPxConfig treats a route metric of '0' as the device priority, while NMIPxConfig allows 0 as a valid route metric. Since the setting values are preferred (they are supposed to be user-supplied and thus override anythign else, but in this case they are generated and thus not user-supplied) external routes with a metric of 0 are overwritten with the device priority metric. https://bugzilla.gnome.org/show_bug.cgi?id=738268
* trivial: add missing breakDan Williams2014-10-161-0/+1
|
* keyfile: fix handling of enum/flags properties after fcfb4b40 (bgo #738585)Dan Williams2014-10-168-2/+232
| | | | | | | When some properties got converted to G_TYPE_ENUM and G_TYPE_FLAGS the keyfile plugin was not updated to handle these types. https://bugzilla.gnome.org/show_bug.cgi?id=738585
* bluez: fix compiler error due to redefinition of typedefThomas Haller2014-10-141-2/+2
| | | | | | | | | | | | | | | clang warns: make[5]: Entering directory `./NetworkManager/src/devices/bluetooth' CC nm-bluez5-dun.lo nm-bluez5-dun.c:50:3: error: redefinition of typedef 'NMBluez5DunContext' is a C11 feature [-Werror,-Wtypedef-redefinition] } NMBluez5DunContext; ^ ./nm-bluez5-dun.h:27:36: note: previous definition is here typedef struct _NMBluez5DunContext NMBluez5DunContext; ^ Fixes: f1c9595311f52d8b79e8d2032e006005613a8fb1 Signed-off-by: Thomas Haller <thaller@redhat.com>
* bluez: re-add DUN support for Bluez5Lubomir Rintel2014-10-134-43/+556
| | | | | | | | This adds service discovery via SDP and RFCOMM tty management to NetworkManager, as it was dropped from Bluez. Based on work by Dan Williams <dcbw@redhat.com>. The SDP discovery is based on code from Bluez project.
* bluez: track adapter address in NMBluezDeviceDan Williams2014-10-134-6/+32
| | | | | | | | We'll need it for bluez5 DUN support. [lkundrak@v3.sk: Turn the addresses to strings from guint8[ETH_ALEN], as that is what rest of NetworkManager uses for MAC addresses and what Bluez utility functions expect as well.]
* bluez: split out errorsDan Williams2014-10-135-18/+73
| | | | We'll use them from more places than nm nm-bt-device.c in the future.
* core: log connection change with nm_utils_log_connection_diff()Thomas Haller2014-10-122-0/+4
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: add nm_utils_log_connection_diffThomas Haller2014-10-123-0/+305
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm-util: don't assert in nm_setting_get_secret_flags() and avoid ↵Thomas Haller2014-10-125-27/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assertion in agent_secrets_done_cb() When secret providers return the connection hash in GetSecrets(), this hash should only contain secrets. However, some providers also return non-secret properties. for_each_secret() iterated over all entries of the @secrets hash and triggered the assertion in nm_setting_get_secret_flags() (see below). NM should not assert against user provided input. Change nm_setting_get_secret_flags() to silently return FALSE, if the property is not a secret. Indeed, handling of secrets is very different for NMSettingVpn and others. Hence nm_setting_get_secret_flags() has only an inconsistent behavior and we have to fix all call sites to do the right thing (depending on whether we have a VPN setting or not). Now for_each_secret() checks whether the property is a secret without hitting the assertion. Adjust all other calls of nm_setting_get_secret_flags(), to anticipate non-secret flags and assert/warn where appropriate. Also, agent_secrets_done_cb() clears now all non-secrets properties from the hash, using the new argument @remove_non_secrets when calling for_each_secret(). #0 0x0000003370c504e9 in g_logv () from /lib64/libglib-2.0.so.0 #1 0x0000003370c5063f in g_log () from /lib64/libglib-2.0.so.0 #2 0x00007fa4b0c1c156 in get_secret_flags (setting=0x1e3ac60, secret_name=0x1ea9180 "security", verify_secret=1, out_flags=0x7fff7507857c, error=0x0) at nm-setting.c:1091 #3 0x00007fa4b0c1c2b2 in nm_setting_get_secret_flags (setting=0x1e3ac60, secret_name=0x1ea9180 "security", out_flags=0x7fff7507857c, error=0x0) at nm-setting.c:1124 #4 0x0000000000463d03 in for_each_secret (connection=0x1deb2f0, secrets=0x1e9f860, callback=0x464f1b <has_system_owned_secrets>, callback_data=0x7fff7507865c) at settings/nm-settings-connection.c:203 #5 0x000000000046525f in agent_secrets_done_cb (manager=0x1dddf50, call_id=1, agent_dbus_owner=0x1ddb9e0 ":1.39", agent_username=0x1e51710 "thom", agent_has_modify=1, setting_name=0x1e91f90 "802-11-wireless-security", flags=NM_SETTINGS_GET_SECRETS_FLAG_ALLOW_INTERACTION, secrets=0x1e9f860, error=0x0, user_data=0x1deb2f0, other_data2=0x477d61 <get_secrets_cb>, other_data3=0x1ea92a0) at settings/nm-settings-connection.c:757 #6 0x00000000004dc4fd in get_complete_cb (parent=0x1ea6300, secrets=0x1e9f860, agent_dbus_owner=0x1ddb9e0 ":1.39", agent_username=0x1e51710 "thom", error=0x0, user_data=0x1dddf50) at settings/nm-agent-manager.c:1139 #7 0x00000000004dab54 in req_complete_success (req=0x1ea6300, secrets=0x1e9f860, agent_dbus_owner=0x1ddb9e0 ":1.39", agent_uname=0x1e51710 "thom") at settings/nm-agent-manager.c:502 #8 0x00000000004db86e in get_done_cb (agent=0x1e89530, call_id=0x1, secrets=0x1e9f860, error=0x0, user_data=0x1ea6300) at settings/nm-agent-manager.c:856 #9 0x00000000004de9d0 in get_callback (proxy=0x1e47530, call=0x1, user_data=0x1ea10f0) at settings/nm-secret-agent.c:267 #10 0x000000337380cad2 in complete_pending_call_and_unlock () from /lib64/libdbus-1.so.3 #11 0x000000337380fdc1 in dbus_connection_dispatch () from /lib64/libdbus-1.so.3 #12 0x000000342800ad65 in message_queue_dispatch () from /lib64/libdbus-glib-1.so.2 #13 0x0000003370c492a6 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #14 0x0000003370c49628 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0 #15 0x0000003370c49a3a in g_main_loop_run () from /lib64/libglib-2.0.so.0 #16 0x000000000042e5c6 in main (argc=1, argv=0x7fff75078e88) at main.c:644 Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: prefer connections with higher priority for autoconnectThomas Haller2014-10-124-0/+131
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=580018 Signed-off-by: Thomas Haller <thaller@redhat.com>
* core/policy: refactor auto_activate_device() to use a GPtrArrayThomas Haller2014-10-121-5/+13
| | | | | | | | Next we want to sort the array, g_slist_sort() is not guaranteed to be stable, while g_ptr_array_sort() is. Also, sorting a GSList has worse performance. Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: remove nm_device_get_best_auto_connection()Thomas Haller2014-10-123-54/+10
| | | | | | | | | | | | nm_device_get_best_auto_connection() was only used at one place. It was a very simple function, just iterated over a list finding the first can_auto_connect() connection. At the very least, the name was misleading, because it did not return the 'best', but the 'first' connection. Get rid of the function altogether. Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: add nm_device_can_auto_connect() functionThomas Haller2014-10-122-0/+32
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: ensure properly comparing boolean values in connection_sort()Thomas Haller2014-10-121-5/+5
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* ifcfg-rh: add support for NM_SETTING_CONNECTION_AUTOCONNECT_PRIORITYThomas Haller2014-10-124-1/+17
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* ifcfg-rh: add svGetValueInt64() utility functionThomas Haller2014-10-122-0/+39
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* dhcp: relax check valid PID for dhcp processThomas Haller2014-10-101-1/+1
| | | | | | | | | All callers only pass a PID that previously was returned from spawning a process. AFAIS, there is no officially reserved range for lower PIDs that would enforce valid PIDs to be larger then 25. Relax this check. Signed-off-by: Thomas Haller <thaller@redhat.com>
* core/dhcp: kill external dhcp process using nm_utils_kill_process_sync()Thomas Haller2014-10-101-2/+6
| | | | | | | | | | | nm_utils_kill_child_sync() is not able to reap the external process. This causes NM to hang for 500 ms and logs the following error: <debug> [1412167360.400201] [NetworkManagerUtils.c:534] nm_utils_kill_child_sync(): kill child process 'dhcp-client' (7109): waiting up to 500 milliseconds for process to terminate normally afte <debug> [1412167360.900298] [NetworkManagerUtils.c:549] nm_utils_kill_child_sync(): kill child process 'dhcp-client' (7109): sending SIGKILL... <error> [1412167360.900369] [NetworkManagerUtils.c:576] nm_utils_kill_child_sync(): kill child process 'dhcp-client' (7109): after sending SIGTERM (15) and SIGKILL, waitpid failed with No child Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: add nm_utils_kill_process_sync() functionThomas Haller2014-10-102-2/+145
| | | | | | | | This utility function is for killing other processes. Contrary to nm_utils_kill_child_*() which is for killing and reaping child processes. Signed-off-by: Thomas Haller <thaller@redhat.com>