Commit graph

12565 commits

Author SHA1 Message Date
Glenn Washburn
061b7bbde8 dhcp-helper: call g_type_init() to support pre 2.36.0 glib
https://bugzilla.gnome.org/show_bug.cgi?id=758614

(cherry picked from commit 7a97d16944)
2015-11-25 10:57:12 +01:00
Fran Diéguez
ad572bedbe po: updated Galician (gl) translation (bgo #758631)
Some errors fixed by Jiri Klimes

https://bugzilla.gnome.org/show_bug.cgi?id=758631
2015-11-25 09:51:35 +01:00
Jiří Klimeš
a261e9c3e5 device: use nm_utils_find_helper() to find out ping/ping6 binary (bgo #758566)
https://bugzilla.gnome.org/show_bug.cgi?id=758566

(cherry picked from commit 795a3943ea)
2015-11-24 14:35:46 +01:00
Thomas Haller
1e7d952731 tests: merge branch 'th/test-run-valgrind'
(cherry picked from commit 5276f6896b)
2015-11-24 11:15:27 +01:00
Thomas Haller
f29aee87ec nmtst/valgrind: allow calling 'run-test-valgrind.sh' script directly
When you want to run valgrind for a test, you either had to
invoke valgrind manually, or doing it via `make check` (provided
you configured --with-valgrind).

Make it more convenient to run valgrind by passing the test
to run to the "run-test-valgrind.sh" wrapper.

This also allows to pass -p/-s to the test, which is not possible
during `make check` because selecting tests conflicts with "--tap".
The following invocations are largely equivalent and work as
expected:

  $ ./tools/run-test-valgrind.sh ./src/platform/tests/test-link-linux -p /link/software/detect/vlan

  $ NMTST_DEBUG=no-debug,p=/link/software/detect/vlan ./tools/run-test-valgrind.sh ./src/platform/tests/test-link-linux

(cherry picked from commit 4dacf0b1ad)
2015-11-24 11:14:50 +01:00
Thomas Haller
243d0facb8 nmtst: support -p and -s arguments from gtestutils via $NMTST_DEBUG
For tests based on glib's test framework, you can select which tests to
run by passing -p/-s on the command line.

Usually, we want to invoke our tests via `make check` which conveniently
calls valgrind (run-test-valgrind.sh) or spawns a private D-Bus server
(libnm-test-launch.sh, libnm-glib-test-launch.sh). At that point, it is
not directly possible to specify command line arguments for the tests,
which is why it is convenient to specify arguments via $NMTST_DEBUG
environment variable.

Parse "p" and "s" arguments from $NMTST_DEBUG and pass them to g_test_init()
to select which tests to run.

  NMTST_DEBUG=p=/core/general/test_setting_ip4_changed_signal ./libnm-core/tests/test-general

However, there is a problem here: in gtestutils, -p/-s conflicts with --tap,
which is how our Makefile invokes the tests. Thus the new options explicitly
don't work when being called during `make check`. Which makes this much
less useful. I only noticed that afterwards, so still keep the patch
because it might still be convenient during developing tests to set the
environment variable once, and then repeatedly spawn the tests, without
specifying -p/-s.

(cherry picked from commit 73cb579108)
2015-11-24 11:14:48 +01:00
Thomas Haller
7eed71d860 nmtst: pass -m=quick when specifying quick test in $NMTST_DEBUG
When the environment variable indicates that we want to run quick
tests, pass "-m=quick" to g_test_init().

(cherry picked from commit a6a2fd7eef)
2015-11-24 11:14:47 +01:00
Thomas Haller
8bdb2aaeea nmtst: detect whether the test runs as tap test
Same as gtestutils does, look for --tap command line argument.

(cherry picked from commit c8174f0f9f)
2015-11-24 11:14:46 +01:00
Thomas Haller
c3aafd9dab nmtst: initialize g_test_init() after parsing NMTST_DEBUG
(cherry picked from commit 5031fc3c71)
2015-11-24 11:14:42 +01:00
Lubomir Rintel
dd32d973b0 release: bump version to 1.0.9 (development) 2015-11-23 18:03:04 +01:00
Lubomir Rintel
faea1ff074 release: bump version to 1.0.8 2015-11-23 17:54:42 +01:00
Thomas Haller
0414e61e9a main: add argument --print-config to NetworkManager
(cherry picked from commit e1ea4b725e)
2015-11-22 13:46:21 +01:00
Lubomir Rintel
2c7ea3d7c3 release: update NEWS 2015-11-20 19:56:34 +01:00
Thomas Haller
0178baea2c default-route: fix deleting default-route when disconnecting device (bgo #757587)
When deconfiguring a device, we must also explicitly clear the
default-route -- unless the device was assumed.

This can easily reproduced by disconnecting the cable from the
wired connection that has the default rout. Prevously, the
default-route was not cleared and lingered around.

https://bugzilla.gnome.org/show_bug.cgi?id=757587
(cherry picked from commit c2831875e3)
2015-11-20 15:26:12 +01:00
Thomas Haller
c8d688874f default-route: introduce _LOG2*() logging macros to log entry-messages
(cherry picked from commit 661ce49973)
2015-11-20 15:24:25 +01:00
Thomas Haller
1bfd5b098d logging: introduce an alternative set of logging macros
We already have the macros _LOGD(), _LOGI(), etc. to provide context sensitive
logging (such as printing the object pointer as prefix).

In some implementations, we would like to have a second set of logging
macros, that shall be used differently. For example, use the default
_LOGD() for messages that are explicitly issued by one objects, and use
_LOG2D() in a static context when no object is around.

The "_LOG2" prefix is not great from a naming point of view. However, it is
meant to be a second (alternative) set of logging macros with the same
usage pattern as the _LOGD() macros.

(cherry picked from commit ed5ebf7e74)
2015-11-20 15:24:25 +01:00
Thomas Haller
4297db4f4c macros: add nm_sprintf_buf() helper macro
(cherry picked from commit abd607257b)
2015-11-20 15:15:18 +01:00
Anders Jonsson
05acff5507 po: update Swedish (sv) translation (bgo #758366)
https://bugzilla.gnome.org/show_bug.cgi?id=758366
2015-11-20 09:24:24 +01:00
Jiří Klimeš
1d4a5b9c8b wifi: do update BSSID cache in activation_success_handler() (rh #1094298)
Even if update_seen_bssids_cache() is called by set_current_ap() it did not
really update the cache because it was called in NM_DEVICE_STATE_PREPARE state.
So the cache was only updated by periodic_update() when the connection roamed
to another AP.

Fixes: 1283816b41

https://bugzilla.redhat.com/show_bug.cgi?id=1094298

(cherry picked from commit d4ebffcfb9)
2015-11-19 14:52:49 +01:00
Thomas Haller
dc54bb31f8 valgrind: add suppression for glib's g_thread_return()
(cherry picked from commit 47008aaaf9)
2015-11-18 12:17:27 +01:00
Thomas Haller
f3491f0c83 valgrind: update suppression file for glib's thread pool
(cherry picked from commit 8c01dc59f8)
2015-11-18 12:16:42 +01:00
Jiří Klimeš
3650cff2a1 ifcfg: fix a possible double-free error on invalid WEP key (rh #1281324)
https://bugzilla.redhat.com/show_bug.cgi?id=1281324

(cherry picked from commit f902444325)
2015-11-18 09:22:41 +01:00
Jiří Klimeš
09d34ac02d nm-online: do not put \r to a translatable string (bgo #758102)
msgmerge complains with
"warning: internationalized messages should not contain the '\r' escape sequence"

Found by Anders Jonsson <anders.jonsson@norsjovallen.se>

https://bugzilla.gnome.org/show_bug.cgi?id=758102

(cherry picked from commit 2c8c4ce2e4)
2015-11-16 15:26:15 +01:00
Jiří Klimeš
85a52fc1b1 all: fix typos in the code and update translations for that (bgo #758102)
Found by Anders Jonsson <anders.jonsson@norsjovallen.se>

https://bugzilla.gnome.org/show_bug.cgi?id=758102

(cherry picked from commit b92397f925)
2015-11-16 14:42:30 +01:00
Milo Casagrande
8109b084a0 po: update Italian (it) translation (bgo #758103)
https://bugzilla.gnome.org/show_bug.cgi?id=758103
2015-11-16 13:16:52 +01:00
Piotr Drąg
84c7a9c794 po: update Polish (pl) translation (bgo #758067)
https://bugzilla.gnome.org/show_bug.cgi?id=758067

(cherry picked from commit ec46ddf113)
2015-11-16 13:05:57 +01:00
Beniamino Galvani
46f741cce4 libnm-core/tests: fix bit shift
Use a maximum shift amount of 63 for guint64.

Fixes: 0a3c1f5774
(cherry picked from commit ac78c18855)
2015-11-15 11:18:51 +01:00
Beniamino Galvani
18770ece53 macros: avoid signed overflow in nm_utils_is_power_of_two()
If __x is signed and its value is the minimum allowed for the type,
(__x - 1) causes a signed overflow, which has an undefined
behavior. Compiling with -fsanitize=undefined produces the warnings:

test-general.c:4499:619: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'
test-general.c:4506:681: runtime error: signed integer overflow: -2147483648 - 1 cannot be represented in type 'TEST_IS_POWER_OF_TWP_ENUM_SIGNED'
test-general.c:4501:619: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long int'
test-general.c:4509:691: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'TEST_IS_POWER_OF_TWP_ENUM_UNSIGNED_64'

Change the order of expressions to avoid this.

Fixes: 0a3c1f5774
(cherry picked from commit bc9d034775)
2015-11-15 11:18:48 +01:00
Glenn Washburn
bd5a4c6f6a build: add backward compatibility define for missing CLOCK_BOOTTIME
[thaller@redhat.com: modified original patch]

https://bugzilla.gnome.org/show_bug.cgi?id=757911
(cherry picked from commit 61948913c5)
2015-11-13 17:22:35 +01:00
Glenn Washburn
6a9d8c7fa4 build: disable Pragmas for pre 4.6 gcc
Gcc 4.6 introduced Pragma "GCC diagnostic" (https://gcc.gnu.org/gcc-4.6/changes.html)
Don't use them for older gcc.

[thaller@redhat.com: modified original patch]

https://bugzilla.gnome.org/show_bug.cgi?id=757910
(cherry picked from commit 6263703286)
2015-11-13 17:20:58 +01:00
Lubomir Rintel
9488e40d34 dispatcher: don't abort when VPN connections have no IPv4
They don't need it. Also, we shouldn't assert on something that can be
done via a D-Bus API.

(cherry picked from commit faae84370f)
2015-11-13 16:15:01 +01:00
Dan Williams
095818ac10 wifi: clean up removal of current AP if it fails during association (bgo #733105)
There's a race between when link_timeout_cb() runs and removes priv->current_ap,
and the supplicant removing priv->current_ap and finding it again.  The race appears
to be:

* connected to AP, so ssid_found = TRUE
* AP powers off
* supplicant state change to DISCONNECTED
* supplicant_iface_state_cb() schedules link_timeout_cb() and sets ssid_found=false
* AP powers on
* Supplicant announces that it found the AP again
* Supplicant either doesn't try to connect to AP, or doesn't get far enough before:
* NM runs link_timeout_cb(), removes AP from scan list
* nothing happens because the AP isn't in the scan list

We can use WPAS_REMOVED_TAG in link_timeout_cb() to figure out whether the
supplicant knows about the AP or not.  If it does know about the AP, then
the AP shouldn't be removed from NM's scan list.

https://bugzilla.gnome.org/show_bug.cgi?id=733105
2015-11-12 12:21:32 -06:00
Lubomir Rintel
d19cbabc14 nm-device: only progress with ip-config if the device is still in IP_WAIT
The device might be a slave and not need any L3 configuration in which case it
will move to IP_DONE:

  Running test bridge_manipulation_with_1000_slaves
  ...
  <debug> [1446834482.545396] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 12-dhcpd succeeded
  <debug> [1446834482.545404] [nm-dispatcher.c:304] dispatcher_results_process(): (121) 20-chrony succeeded
  <debug> [1446834482.545481] [devices/nm-device.c:5374] nm_device_activate_stage3_ip_config_start(): [0x7fc77e1c0fc0] (port120): Activation: Stage 3 of 5 (IP Configure Start) started...
  <info>  (port120): device state change: config -> ip-config (reason 'none') [50 70 0]
  <debug> [1446834482.545578] [devices/nm-device.c:1683] slave_state_changed(): [0x7fc77df77020] (bridge0): slave port120 state change 50 (config) -> 70 (ip-config)
  <debug> [1446834482.545629] [devices/nm-device.c:7955] nm_device_add_pending_action(): [0x7fc77e1c0fc0] (port120): add_pending_action (2): 'queued state change to secondaries'
  <debug> [1446834482.545642] [devices/nm-device.c:8806] nm_device_queue_state(): [0x7fc77e1c0fc0] (port120): queued state change to secondaries due to none (id 11380)
  ** NetworkManager:ERROR:devices/nm-device.c:5250:nm_device_activate_stage3_ip4_start: assertion failed: (priv->ip4_state == IP_WAIT)

  5250            g_assert (priv->ip4_state == IP_WAIT);
  (gdb) print priv->ip4_state
  $1 = IP_DONE
  (gdb) print priv->master
  $3 = { ...  master = 0x7fc77df77020, enslaved = 1, master_ready_handled = 1,
    master_ready_id = 0, is_master = 0, slaves = 0x0, ...}

(cherry picked from commit f8973a7f42)
2015-11-11 19:43:42 +01:00
Thomas Haller
ae22a44ba0 wifi: minor refactoring logging BSSID in supplicant_iface_new_bss_cb()
(cherry picked from commit 99ff6681b7)
2015-11-11 18:14:47 +01:00
Thomas Haller
0ff3699af5 Revert "wifi: do no crash when getting BSSID fails"
Since commit ebe3320e62,
nm_ap_new_from_properties() will always return an
AP with BSSID set. Restore the assertion during
try_fill_ssid_for_hidden_ap().

This reverts commit e0e043ef39.

(cherry picked from commit d5373959f9)
2015-11-11 18:10:52 +01:00
Dan Williams
ebe3320e62 wifi: don't accept any BSSes with missing BSSIDs (rh #1276426)
The supplicant should never be sending us BSSes without BSSIDs.

https://bugzilla.redhat.com/show_bug.cgi?id=1276426
(cherry picked from commit 7cb323d923)
2015-11-11 17:51:39 +01:00
Beniamino Galvani
ccc4b1dd54 systemd/adapt: return G_SOURCE_REMOVE in time event callback
Differently from GLib timeout sources, systemd ones are always
one-shot and therefore we must return G_SOURCE_REMOVE in the callback,
otherwise the timer will be scheduled again.

In most cases things were working correctly because usually the
callback also unreferences the source event, but when this doesn't
happen the timer will trigger multiple times as reported in the bug
below.

https://bugzilla.redhat.com/show_bug.cgi?id=1278506

Fixes: 1b1222ffdf
(cherry picked from commit a74e98bfc6)
2015-11-11 17:32:17 +01:00
Thomas Haller
db6f8315e5 python: use gi.require_version() in generate-setting-docs.py and examples
gi now emits a warning when not loading a specific library
version [1]:

  ./generate-setting-docs.py:21: PyGIWarning: NM was imported without specifying a version first. Use gi.require_version(NM, 1.0) before import to ensure that the right version gets loaded.
    from gi.repository import NM, GObject

Seems require_version() is reasonably old to just always use it without
breaking on older versions [2].

[1] Related: https://bugzilla.gnome.org/show_bug.cgi?id=727379
[2] https://git.gnome.org/browse/pygobject/commit/?id=76758efb6579752237a0dc4d56cf9518de6c6e55

(cherry picked from commit 8d1233e67e)
2015-11-11 15:47:13 +01:00
Thomas Haller
5196c89b67 build: hack around compiler warning in g-ir-scanner
The autoconf macro for GIR passes $CFLAGS to g-ir-scanner.
g-ir-scanner extends those flags with the system-default which
includes -D_FORTIFY_SOURCE=2. Probably it should not do that,
but if you disable optimization, this results in a compler warning
in "/usr/include/features.h" [1]

    export CFLAGS='-O0'
    # Happens both with clang or gcc.
    #export CC=clang
    git clean -fdx
    ./autogen.sh
    make

Work around that by injecting -Wno-error to $CFLAGS when invoking
g-ir-scanner.

[1] Related: https://sourceware.org/bugzilla/show_bug.cgi?id=13979
Related: https://bugzilla.gnome.org/show_bug.cgi?id=757934

(cherry picked from commit f6272144e9)
2015-11-11 15:45:59 +01:00
Jiří Klimeš
84d741f106 cli: print a warning if BSSID is given instead of SSID for hidden AP
$ nmcli dev wifi connect 00:22:6B:EB:1D:CA hidden yes
Warning: '00:22:6B:EB:1D:CA' should be SSID for hidden APs; but it looks like a BSSID.
Error: Failed to add/activate new connection: 802-11-wireless.ssid: connection does not match access point

(cherry picked from commit 0dc48370b4)
2015-11-11 09:58:14 +01:00
Jiří Klimeš
36218c1be6 wifi: fix a crash while attempting to connect hidden AP (bgo #757814)
Triggered with
$ nmcli dev wifi connect 00:22:6B:EB:1D:CA hidden yes

where 00:22:6B:EB:1D:CA was BSSID of the AP with hidden SSID.

 Program received signal SIGSEGV, Segmentation fault.
 nm_ap_utils_complete_connection (ap_ssid=0x0, bssid=0xc9e6b0 "00:22:6B:EB:1D:CA", ap_mode=NM_802_11_MODE_INFRA, ap_flags=1, ap_wpa_flags=0, ap_rsn_flags=0,
     connection=0x994ae0, lock_bssid=0, error=0x7fffffffdba0) at nm-wifi-ap-utils.c:551
 551		ap_ssid_bytes = g_bytes_new (ap_ssid->data, ap_ssid->len);
 (gdb) bt
 #0  0x00007fffe2ea18ef in nm_ap_utils_complete_connection (ap_ssid=0x0, bssid=0xc9e6b0 "00:22:6B:EB:1D:CA", ap_mode=NM_802_11_MODE_INFRA, ap_flags=1, ap_wpa_flags=0, ap_rsn_flags=0, connection=0x994ae0, lock_bssid=0, error=0x7fffffffdba0) at nm-wifi-ap-utils.c:551
 #1  0x00007fffe2ea178f in nm_ap_complete_connection (self=self@entry=0x8add20 [NMAccessPoint], connection=connection@entry=0x994ae0, lock_bssid=0, error=error@entry=0x7fffffffdba0) at nm-wifi-ap.c:854
 #2  0x00007fffe2e9e22c in complete_connection (device=0x8c39f0 [NMDeviceWifi], connection=0x994ae0, specific_object=<optimized out>, existing_connections=0xb2ef10 = {...}, error=0x7fffffffdba0) at nm-device-wifi.c:839
 #3  0x000000000045f7a1 in nm_device_complete_connection (self=<optimized out>, connection=connection@entry=0x994ae0, specific_object=specific_object@entry=0xc31850 "/org/freedesktop/NetworkManager/AccessPoint/11", existing_connections=existing_connections@entry=0xb2ef10 = {...}, error=error@entry=0x7fffffffdba0)
    at devices/nm-device.c:2603
 #4  0x00000000004e0a66 in impl_manager_add_and_activate_connection (self=0x8b81f0 [NMManager], context=0x7fffe804bde0 [GDBusMethodInvocation], settings=<optimized out>, device_path=<optimized out>, specific_object_path=0xc31850 "/org/freedesktop/NetworkManager/AccessPoint/11") at nm-manager.c:3426
 #5  0x0000003bf6c05db0 in ffi_call_unix64 () at ../src/x86/unix64.S:76
 #6  0x0000003bf6c05818 in ffi_call (cif=cif@entry=0x7fffffffde10, fn=<optimized out>, rvalue=0x7fffffffdd70, avalue=avalue@entry=0x7fffffffdcf0)
    at ../src/x86/ffi64.c:525
 #7  0x0000003bf7010464 in g_cclosure_marshal_generic (closure=closure@entry=0x8d4ae0, return_gvalue=return_gvalue@entry=0x0, n_param_values=n_param_values@entry=5, param_values=param_values@entry=0xb508f0, invocation_hint=invocation_hint@entry=0x7fffffffe020, marshal_data=0x4e0890 <impl_manager_add_and_activate_connection>)
    at gclosure.c:1448
 #8  0x00000000004c6038 in nm_exported_object_meta_marshal (closure=0x8d4ae0, return_value=0x7fffffffdfd0, n_param_values=5, param_values=0xc2a240, invocation_hint=0x7fffffffe020, marshal_data=<optimized out>) at nm-exported-object.c:346

https://bugzilla.gnome.org/show_bug.cgi?id=757814
(cherry picked from commit 98b0b4b402)
2015-11-11 09:58:08 +01:00
Dan Williams
5fe23c6adc core: fix builds with older gcc (like 4.4.x)
(cherry picked from commit 09a2be3b65)
2015-11-10 11:12:33 -06:00
Adam Bk
106e222852 man: fix synopsis for nmcli connection up (bgo #757777)
'passwd' -> 'passwd-file'

https://bugzilla.gnome.org/show_bug.cgi?id=757777

(cherry picked from commit cfa4195e0c)
2015-11-09 15:57:33 +01:00
Lubomir Rintel
8f6995a165 agent-manager: cancel pending auth chain for the disappearing agent
If the current agent disappears and we already triggered the permission check
for it then the callback for that permission check will fire after we
progressed to the next agent:

  # nmcli c --wait 0 up vpn

When another agent, such as GNOME Shell is registered, then get_done_cb() for
the nmcli will be called after we started the permission check for GNOME Shell,
resulting in an assertion fail:

  get_done_cb: assertion 'call_id == parent->current_call_id' failed

Moved the track of the auth chain to Request from Connection request so that
it's possible to unref it in request_remove_agent().

(cherry picked from commit 553c15410e)
2015-11-06 17:18:28 +01:00
Lubomir Rintel
aa56f81751 device: set a reason when device enslave fails
Otherwise we'd hit an assert and rightly so!

  Program received signal SIGTRAP, Trace/breakpoint trap.
  g_logv (log_domain=0x5555556b2f80 "NetworkManager", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffcd10) at gmessages.c:1046
  1046              g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
  (gdb) bt
  #0  g_logv (log_domain=0x5555556b2f80 "NetworkManager", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=args@entry=0x7fffffffcd10) at gmessages.c:1046
  #1  0x00007ffff4a4ea3f in g_log (log_domain=log_domain@entry=0x5555556b2f80 "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x7ffff4ac1e4c "%s") at gmessages.c:1079
  #2  0x00007ffff4a4ed56 in g_warn_message (domain=domain@entry=0x5555556b2f80 "NetworkManager", file=file@entry=0x5555556aca93 "devices/nm-device.c", line=line@entry=1101,
      func=func@entry=0x5555556b22e0 <__FUNCTION__.35443> "nm_device_release_one_slave", warnexpr=warnexpr@entry=0x0) at gmessages.c:1112
  #3  0x00005555555ba80a in nm_device_release_one_slave (self=self@entry=0x5555559ec4c0, slave=slave@entry=0x5555559f7800, configure=configure@entry=1, reason=reason@entry=NM_DEVICE_STATE_REASON_NONE)
      at devices/nm-device.c:1101
  #4  0x00005555555c264b in slave_state_changed (slave=0x5555559f7800, slave_new_state=NM_DEVICE_STATE_FAILED, slave_old_state=NM_DEVICE_STATE_IP_CONFIG, reason=NM_DEVICE_STATE_REASON_NONE, self=0x5555559ec4c0)
      at devices/nm-device.c:1700
  #5  0x00007ffff339cdac in ffi_call_unix64 () at ../src/x86/unix64.S:76
  #6  0x00007ffff339c6d5 in ffi_call (cif=cif@entry=0x7fffffffd1c0, fn=<optimized out>, rvalue=0x7fffffffd130, avalue=avalue@entry=0x7fffffffd0b0) at ../src/x86/ffi64.c:522
  #7  0x00007ffff4d45678 in g_cclosure_marshal_generic (closure=0x5555559b0160, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0)
      at gclosure.c:1454
  #8  0x00007ffff4d44e38 in g_closure_invoke (closure=0x5555559b0160, return_value=return_value@entry=0x0, n_param_values=4, param_values=param_values@entry=0x7fffffffd3c0,
      invocation_hint=invocation_hint@entry=0x7fffffffd360) at gclosure.c:768
  #9  0x00007ffff4d5675d in signal_emit_unlocked_R (node=node@entry=0x55555598a6f0, detail=detail@entry=0, instance=instance@entry=0x5555559f7800, emission_return=emission_return@entry=0x0,
      instance_and_params=instance_and_params@entry=0x7fffffffd3c0) at gsignal.c:3553
  #10 0x00007ffff4d5e4c1 in g_signal_emit_valist (instance=instance@entry=0x5555559f7800, signal_id=signal_id@entry=72, detail=detail@entry=0, var_args=var_args@entry=0x7fffffffd5f8) at gsignal.c:3309
  #11 0x00007ffff4d5ecc8 in g_signal_emit_by_name (instance=instance@entry=0x5555559f7800, detailed_signal=detailed_signal@entry=0x5555556c0405 "state-changed") at gsignal.c:3405
  #12 0x00005555555bd0e0 in _set_state_full (self=self@entry=0x5555559f7800, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=NM_DEVICE_STATE_REASON_NONE, quitting=quitting@entry=0)
      at devices/nm-device.c:8580
  #13 0x00005555555be0e7 in nm_device_state_changed (self=self@entry=0x5555559f7800, state=state@entry=NM_DEVICE_STATE_FAILED, reason=reason@entry=NM_DEVICE_STATE_REASON_NONE) at devices/nm-device.c:8741
  #14 0x00005555555c0a45 in queued_set_state (user_data=<optimized out>) at devices/nm-device.c:8765
  #15 0x00007ffff4a4779a in g_main_dispatch (context=0x5555559433c0) at gmain.c:3109
  #16 g_main_context_dispatch (context=context@entry=0x5555559433c0) at gmain.c:3708
  #17 0x00007ffff4a47ae8 in g_main_context_iterate (context=0x5555559433c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3779
  #18 0x00007ffff4a47dba in g_main_loop_run (loop=0x555555943480) at gmain.c:3973
  #19 0x000055555559713d in main (argc=1, argv=0x7fffffffdb78) at main.c:512
  (gdb)

(cherry picked from commit aa05d25bef)
2015-11-06 15:44:48 +01:00
Thomas Haller
ca7d6feafd logging: swap names of logging macros _LOGT() and _LOGt()
Previsously, _LOGT() could be disabled at compile time. Thus it
was different then the other macros _LOGD(), _LOGI(), etc.

OTOH, _LOGt() was the macro that always was compiled in.

Swap the name of the macros. Now the upper-case macros are always
enabled, while the lower-case macro _LOGt() is enabled depending
on compile configuration.

(cherry picked from commit 9587867349)
2015-11-06 14:21:11 +01:00
Lubomir Rintel
8c8e88ae28 agent-manager: don't try to cancel requests that already finished
Fixes: 5d1cac81a0
(cherry picked from commit f558502278)
2015-11-05 15:34:28 +01:00
Lubomir Rintel
302914c010 build: add missing GLIB_CFLAGS
The library and the include paths are dragged in with DBUS_CFLAGS but we need
more; especially the GLIB_VERSION_{MIN/MAX}_REQUIRED macros. Otherwise we get
deprecation warnings.

No master commit, since this was fixed as a side-effect of the GDBus merge.
2015-11-05 14:48:23 +01:00
Jiří Klimeš
112f3f8aca policy: fix looping through list while removing elements (rh #1175446)
When g_slist_remove() was called, iter2 became invalid and accessing it
could cause a crash. The same was true for iter.
Fix the problem by getting the next list item before an element removal.

See a similar fix in bluez
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=be8c5be809875ba449a10ca29f5244f0231f6b63

https://bugzilla.redhat.com/show_bug.cgi?id=1175446
https://bugzilla.redhat.com/show_bug.cgi?id=1277247

(cherry picked from commit b9da3d9320)
2015-11-05 12:54:27 +01:00
Beniamino Galvani
8b5e5a3dae device: terminate the activation chain when entering the failed state
Device activation normally fails during one of the stages and in that
case the activation chain is implicitly interrupted.

But in some cases the device fails for external events (as a failure
of master connection) while the activation sequence is still running
and so we need to ensure that any pending activation source gets
cleared upon entering the failed state.

https://bugzilla.redhat.com/show_bug.cgi?id=1270814
(cherry picked from commit c8e2339091)
2015-11-03 22:52:25 +01:00