NetworkManager.git
9 years agoifcfg-rh: allow handling complex routing rules via dispatcher (rh #1160013)
Dan Winship [Wed, 17 Dec 2014 13:50:05 +0000 (08:50 -0500)]
ifcfg-rh: allow handling complex routing rules via dispatcher (rh #1160013)

If a connection has an associated "rule-NAME" or "rule6-NAME" file,
don't try to read in the routes, since NetworkManager won't be able to
parse them correctly. Instead, log a warning that they will need to be
applied via a dispatcher script, and provide a script that would do
that in examples/dispatcher/.

9 years agosettings: make nm_settings_connection_replace_and_commit() virtual
Dan Winship [Wed, 17 Dec 2014 20:02:56 +0000 (15:02 -0500)]
settings: make nm_settings_connection_replace_and_commit() virtual

9 years agodispatcher: pass CONNECTION_FILENAME to dispatcher scripts
Dan Winship [Tue, 16 Dec 2014 19:08:38 +0000 (14:08 -0500)]
dispatcher: pass CONNECTION_FILENAME to dispatcher scripts

9 years agosettings: add NMSettingsConnection:filename
Dan Winship [Tue, 16 Dec 2014 19:07:39 +0000 (14:07 -0500)]
settings: add NMSettingsConnection:filename

Add a "filename" property to NMSettingsConnection, and set it from
keyfile and ifcfg-rh (replacing the existing priv->path variables in
those connection types). (The other plugins either don't use files, or
don't use per-connection files.)

9 years agokeyfile: retry harder finding a suitable filename in writer()
Thomas Haller [Fri, 28 Nov 2014 16:36:10 +0000 (17:36 +0100)]
keyfile: retry harder finding a suitable filename in writer()

Try harder to find a suitable filename by appending a counter
to the name.

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

9 years agocore: merge branch 'th/singleton-bgo742450'
Thomas Haller [Mon, 12 Jan 2015 11:17:00 +0000 (12:17 +0100)]
core: merge branch 'th/singleton-bgo742450'

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

9 years agodbus: destroy singleton instance of NMDBusManager on exit
Thomas Haller [Tue, 6 Jan 2015 12:15:43 +0000 (13:15 +0100)]
dbus: destroy singleton instance of NMDBusManager on exit

Don't have the singleton instance of NMDBusManager owned by
the main function. Instead use NM_DEFINE_SINGLETON_DESTRUCTOR()
which also logs what's happening.

9 years agoauth: destroy singleton instance of NMAuthManager on exit
Thomas Haller [Tue, 6 Jan 2015 11:22:25 +0000 (12:22 +0100)]
auth: destroy singleton instance of NMAuthManager on exit

9 years agocore: use NM_DEFINE_SINGLETON_GETTER() macro
Thomas Haller [Mon, 5 Jan 2015 18:27:07 +0000 (19:27 +0100)]
core: use NM_DEFINE_SINGLETON_GETTER() macro

9 years agocore: declare nm_agent_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Tue, 6 Jan 2015 11:11:21 +0000 (12:11 +0100)]
core: declare nm_agent_manager_get() using NM_DEFINE_SINGLETON_GETTER()

Also move the initilization of the instance into the constructed()
method.

NMAgentManager now owns a reference to the DBUS manager and Auth
manager and the dispose() function properly unregisters itself from
both.

9 years agocore: declare nm_supplicant_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Tue, 6 Jan 2015 10:54:27 +0000 (11:54 +0100)]
core: declare nm_supplicant_manager_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_session_monitor_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Tue, 6 Jan 2015 10:50:41 +0000 (11:50 +0100)]
core: declare nm_session_monitor_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_firewall_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Tue, 6 Jan 2015 10:45:14 +0000 (11:45 +0100)]
core: declare nm_firewall_manager_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_inotify_helper_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 18:39:56 +0000 (19:39 +0100)]
core: declare nm_inotify_helper_get() using NM_DEFINE_SINGLETON_GETTER()

Refactor NMInotifyHelper to implement the singleton getter using
NM_DEFINE_SINGLETON_GETTER().

For one this means that the getter no longer increments the reference
count. This was anyway wrong, because no caller of nm_inotify_helper_get()
unrefered the returned reference, hence leaking the singleton.

Also, the getter can no longer fail to create the singleton instance.
Note that none of the callers actually coped with a failure to get
the singleton.
Instead return an instance that does nothing.
One downside (upside?) of this is that we only try once to initialize
the inotify handle.

9 years agocore: declare nm_vpn_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 18:32:36 +0000 (19:32 +0100)]
core: declare nm_vpn_manager_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_dhcp_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 18:30:00 +0000 (19:30 +0100)]
core: declare nm_dhcp_manager_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_dns_manager_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 16:20:23 +0000 (17:20 +0100)]
core: declare nm_dns_manager_get() using NM_DEFINE_SINGLETON_GETTER()

9 years agocore: declare nm_sleep_monitor_get() using NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 15:37:45 +0000 (16:37 +0100)]
core: declare nm_sleep_monitor_get() using NM_DEFINE_SINGLETON_GETTER()

Also no longer increment the reference count in the getter and
properly disconnect the signals in NMManager:dispose().

Also use the defines for the signal names instead of plain strings.

9 years agocore/trivial: rename singleton variables according to default name
Thomas Haller [Mon, 5 Jan 2015 17:26:26 +0000 (18:26 +0100)]
core/trivial: rename singleton variables according to default name

9 years agoall: add macro NM_DEFINE_SINGLETON_GETTER()
Thomas Haller [Mon, 5 Jan 2015 16:20:03 +0000 (17:20 +0100)]
all: add macro NM_DEFINE_SINGLETON_GETTER()

9 years agotrivial: whitespace fix
Thomas Haller [Sun, 11 Jan 2015 21:52:40 +0000 (22:52 +0100)]
trivial: whitespace fix

9 years agocore: merge branch 'th/route-fixes-bgo741871'
Thomas Haller [Sun, 11 Jan 2015 12:34:56 +0000 (13:34 +0100)]
core: merge branch 'th/route-fixes-bgo741871'

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

9 years agoplatform: workaround deletion of IPv4 route with metric 0
Thomas Haller [Mon, 22 Dec 2014 16:59:16 +0000 (17:59 +0100)]
platform: workaround deletion of IPv4 route with metric 0

Deleting routes with metric 0 might end up deleting other
routes with a different metric.

Workaround this in platform to only delete a route with
metric 0 if such a route can be found prior to deletion.

Don't only look into the cache (which might be out of date).
Instead refetch the route we are about to delete to be sure.

There is still a race that we might end up deleting the wrong
route.

https://bugzilla.gnome.org/show_bug.cgi?id=741871
https://bugzilla.redhat.com/show_bug.cgi?id=1172780

9 years agoplatform: route_search_cache() should not treat a metric 0 as "any" route
Thomas Haller [Mon, 22 Dec 2014 17:01:12 +0000 (18:01 +0100)]
platform: route_search_cache() should not treat a metric 0 as "any" route

This match-any behavior ignoring metric is nowhere used. And even if we
would need such a behavior, using 0 is wrong because IPv4 routes can
have a metric of zero.

9 years agoplatform: fix IPv6 route methods for metric 0
Thomas Haller [Mon, 22 Dec 2014 16:06:13 +0000 (17:06 +0100)]
platform: fix IPv6 route methods for metric 0

Handling a route with metric 0 effectively means
a metric of 1024 (user default). Adjust the add(),
delete() and exist() functions to consider routes
with metric 0 as 1024.

9 years agoplatform: fix data type for metric argument of refresh_route()
Thomas Haller [Mon, 22 Dec 2014 17:05:17 +0000 (18:05 +0100)]
platform: fix data type for metric argument of refresh_route()

9 years agoifcfg-rh: support ipvx.route-metric property as IPVX_ROUTE_METRIC
Thomas Haller [Mon, 22 Dec 2014 14:10:22 +0000 (15:10 +0100)]
ifcfg-rh: support ipvx.route-metric property as IPVX_ROUTE_METRIC

Write ipv4.route-metric and ipv6.route-metric property of
NMSettingConnection as IPV4_ROUTE_METRIC and IPV6_ROUTE_METRIC,
respectively.

9 years agoifcfg-rh: fix invalid g_return_val_if_fail() argument in devtimeout_from_file()
Thomas Haller [Sat, 10 Jan 2015 13:21:18 +0000 (14:21 +0100)]
ifcfg-rh: fix invalid g_return_val_if_fail() argument in devtimeout_from_file()

Fixes: 62d870e1a6dd852e50f39b2a32cd291734766402

9 years agocontrib: remove dbus/dbus-glib requires from libnm sub-package
Dan Williams [Fri, 9 Jan 2015 23:11:22 +0000 (17:11 -0600)]
contrib: remove dbus/dbus-glib requires from libnm sub-package

libnm doesn't use dbus-glib or dbus at all.

9 years agodbus: fix NMRUNDIR permissions on create
Dan Williams [Wed, 7 Jan 2015 22:03:02 +0000 (16:03 -0600)]
dbus: fix NMRUNDIR permissions on create

This is really a no-op because the directory will be created by
nm_main_utils_check_pidfile() anyway, but make sure the permissions
are synchronized.  Now that resolv.conf is symlink into NMRUNDIR,
if normal users don't have permissions to read NMRUNDIR then
DNS won't work.

9 years agocore: force disable_ipv6=0 when turning on userspace IPv6LL (bgo #741773)
Dan Williams [Fri, 19 Dec 2014 16:45:31 +0000 (10:45 -0600)]
core: force disable_ipv6=0 when turning on userspace IPv6LL (bgo #741773)

If a device assumes a connection without activating a user-requested or
NM-requested connection, then disable_ipv6 is not touched.  When the device
is deactivated, it still isn't touched even though userspace IPv6LL
is enabled.  This could lead to an user-requested activation with
IPv6 configuration, but disable_ipv6=1.

Whenever userspace IPv6LL is turned on, we should also set disable_ipv6=0
to ensure IPv6 can function.  Userspace IPv6LL will ensure that the
interface does not have an address until the user/connection requests
it, which was the only reason that NM touched disable_ipv6 anyway.

fixes:NetworkManager_Test203_testcase_286589
fixes:NetworkManager_Test204_testcase_286590

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

9 years agokeyfile: fix an uninitialized variable
Dan Winship [Fri, 9 Jan 2015 16:56:39 +0000 (11:56 -0500)]
keyfile: fix an uninitialized variable

read_field() was supposed to set *error to NULL if there was no error,
but it missed one case. (If **current was '\0'.)

9 years agocontrib: sync fedora/rpm/NetworkManager.spec
Dan Winship [Fri, 9 Jan 2015 16:30:50 +0000 (11:30 -0500)]
contrib: sync fedora/rpm/NetworkManager.spec

We're building the plugins on s390 these days

9 years agoifcfg-rh: merge branch danw/devtimeout-rh1171917
Dan Winship [Fri, 9 Jan 2015 14:45:25 +0000 (09:45 -0500)]
ifcfg-rh: merge branch danw/devtimeout-rh1171917

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

9 years agoifcfg-rh: handle DEVTIMEOUT property (rh #1171917)
Dan Winship [Fri, 19 Dec 2014 15:34:19 +0000 (10:34 -0500)]
ifcfg-rh: handle DEVTIMEOUT property (rh #1171917)

If an ifcfg file has a DEVTIMEOUT property (and a DEVICE, and is
ONBOOT=yes), and the device is not present at startup, then wait up to
DEVTIMEOUT seconds for it to appear before declaring the connection
ready.

This allows for a hacky workaround to devices that take a bizarrely
long time to be probed.

9 years agocore: allow connections to participate in NMManager:startup-complete
Dan Winship [Thu, 18 Dec 2014 21:04:07 +0000 (16:04 -0500)]
core: allow connections to participate in NMManager:startup-complete

Add an NMSettingsConnection:ready property, which indicates if the
connection is ready to use. Add NMSettings:startup-complete, which is
TRUE when all connections are ready. Make NMManager:startup-complete
take NMSettings:startup-complete into account.

9 years agokeyfile: another cur at fixing the bridge test
Lubomir Rintel [Fri, 9 Jan 2015 13:37:36 +0000 (14:37 +0100)]
keyfile: another cur at fixing the bridge test

Fixes: 2f82bf537bb8179504cbe0a01fe94783a817a89f

9 years agokeyfile: fix bridge test
Lubomir Rintel [Fri, 9 Jan 2015 13:37:36 +0000 (14:37 +0100)]
keyfile: fix bridge test

Fixes: 2f82bf537bb8179504cbe0a01fe94783a817a89f

9 years agobridge: Properly check range of STP properties (rh #1160815)
Lubomir Rintel [Mon, 10 Nov 2014 17:48:37 +0000 (18:48 +0100)]
bridge: Properly check range of STP properties (rh #1160815)

If zero is out of range, only allow it when STP is disabled.

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

9 years agolibnm-glib/nm-client: zero the CheckConnectivityData structure
Rui Matos [Thu, 8 Jan 2015 14:56:14 +0000 (15:56 +0100)]
libnm-glib/nm-client: zero the CheckConnectivityData structure

Otherwise, if the caller doesn't provide a cancellable we'll try to
access a bogus ccd->cancellable in check_connectivity_data_free() and
crash.

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

9 years agoteam: improve handling of externally managed devices (rh #1172734)
Lubomir Rintel [Thu, 8 Jan 2015 14:16:57 +0000 (15:16 +0100)]
team: improve handling of externally managed devices (rh #1172734)

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

9 years agoteam: get configuration only when teamd appears on bus for externally added interfaces
Lubomir Rintel [Tue, 16 Dec 2014 16:10:10 +0000 (17:10 +0100)]
team: get configuration only when teamd appears on bus for externally added interfaces

teamd first adds the link and only then listens on the bus therefore we race
with it. Let's watch for the bus presence even for the teamd devices we didn't
add for all their lifetime and recheck for assumed connections as we see them.

9 years agoRevert "team: start teamd when ensuring team connection else teamdctl_connect() fails"
Lubomir Rintel [Tue, 16 Dec 2014 14:05:35 +0000 (15:05 +0100)]
Revert "team: start teamd when ensuring team connection else teamdctl_connect() fails"

We don't want to start a teamd instance when there's an externally added team
interface. We just don't want to try to the daemon if it's not there (addressed
by a later commit).

This reverts commit a78386b6d1a3d62063aa039d4ee9eba77c04a284.

Conflicts:
src/devices/team/nm-device-team.c

9 years agolibnm: fix documentation for nm_utils_file_search_in_paths()
Thomas Haller [Thu, 8 Jan 2015 12:06:37 +0000 (13:06 +0100)]
libnm: fix documentation for nm_utils_file_search_in_paths()

9 years agocore: add /bin to the default search path
Thomas Haller [Thu, 8 Jan 2015 10:55:50 +0000 (11:55 +0100)]
core: add /bin to the default search path

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

9 years agobuild: fix --enable-lto configure option to allow disabling option explicitly
Thomas Haller [Thu, 8 Jan 2015 11:01:32 +0000 (12:01 +0100)]
build: fix --enable-lto configure option to allow disabling option explicitly

When specifying '--enable-lto=anything' or '--disable-lto',
the configure script would always set enable_lto=yes.

The only way to disable lto, was *not* specifying the
configure option.

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

9 years agotests: check for no pending expected_messages on exit of tests
Thomas Haller [Wed, 7 Jan 2015 19:32:11 +0000 (20:32 +0100)]
tests: check for no pending expected_messages on exit of tests

On the end of the test there should be no unchecked expected
messages. Register a destructor function in nmtst to assert
against that.

Also call nmtst_free() in the destructor. That way, we always release
the allocated data without requiring the test to do it explicitly.

9 years agotui: fix crash when editing DSL connection
Jiří Klimeš [Wed, 7 Jan 2015 18:29:53 +0000 (19:29 +0100)]
tui: fix crash when editing DSL connection

 Program received signal SIGSEGV, Segmentation fault.
 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109
 109 priv->ethernet_page = nmt_page_ethernet_new (conn, nmt_editor_page_device_get_device_entry (NMT_EDITOR_PAGE_DEVICE (dsl)));
 Missing separate debuginfos, use: debuginfo-install libffi-3.0.10-3.fc18.x86_64 newt-0.52.15-1.fc19.x86_64
 (gdb) bt
 #0  0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109
 #1  0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16203872, n_parameters=n_parameters@entry=2, parameters=parameters@entry=0xf74350)
    at gobject.c:1741
 #2  0x0000003e9ac16560 in g_object_new_valist (object_type=object_type@entry=16203872, first_property_name=first_property_name@entry=0x42e524 "connection",
    var_args=var_args@entry=0x7fffffffcef8) at gobject.c:1830
 #3  0x0000003e9ac16894 in g_object_new (object_type=16203872, first_property_name=first_property_name@entry=0x42e524 "connection") at gobject.c:1545
 #4  0x000000000041b504 in nmt_page_dsl_new (conn=<optimized out>, deventry=deventry@entry=0x974690 [NmtDeviceEntry]) at nmt-page-dsl.c:47
 #5  0x000000000041808e in nmt_editor_constructed (object=<optimized out>) at nmt-editor.c:355
 #6  0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16174256, n_parameters=n_parameters@entry=4, parameters=parameters@entry=0xf6cec0)
     at gobject.c:1741
 ...
 (gdb) p priv
 $1 = (NmtPageDslPrivate *) 0x0

9 years agoifcfg: refactor utils_get_ifcfg_name()
Thomas Haller [Thu, 18 Dec 2014 13:23:28 +0000 (14:23 +0100)]
ifcfg: refactor utils_get_ifcfg_name()

No need to allocate a temporary "base" variable. Just
search for the last '/' ourselves.
All the special handling that g_path_get_basename() does,
for example handling empty filenames and removing trailing
slashes, is not needed.

Thereby fix not to return empty names such as from "ifcfg-".

9 years agotui: fix saving "Available to all users" (rh #1176042)
Jiří Klimeš [Wed, 7 Jan 2015 16:54:13 +0000 (17:54 +0100)]
tui: fix saving "Available to all users" (rh #1176042)

9 years agoRevert "ifcfg-rh: avoid passing NULL error to connection_from_file_full()"
Thomas Haller [Tue, 6 Jan 2015 14:50:35 +0000 (15:50 +0100)]
Revert "ifcfg-rh: avoid passing NULL error to connection_from_file_full()"

This reverts commit 35988ec633bc7dc9a4f85b17b5a59f62645e0f7d.

Since commit ffe0fde235aed7cf6341843adc1488995f8cc346,
wireless_connection_from_ifcfg() accepts a missing @error argument.
Revert this commit because the caller then can control whether to
log the error by providing @error.

9 years agosession: prefer new configure options
Pavel Šimerda [Tue, 6 Jan 2015 14:07:02 +0000 (15:07 +0100)]
session: prefer new configure options

The main motivation for this change is to be able to build configure
command lines that will work for both old and new versions of
NetworkManager.

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agobuild: fix compilation with GLib 2.32
Jiří Klimeš [Tue, 6 Jan 2015 10:59:28 +0000 (11:59 +0100)]
build: fix compilation with GLib 2.32

for g_clear_pointer()

9 years agolibnm-glib: crash when NMRemoteSettings is quickly destroyed (bgo #742138)
Dan Winship [Mon, 5 Jan 2015 20:35:57 +0000 (15:35 -0500)]
libnm-glib: crash when NMRemoteSettings is quickly destroyed (bgo #742138)

NMRemoteSettings queues a bunch of async NMRemoteConnection creations,
but wasn't doing anything to ensure that it was still alive when they
completed. Pointed out by Cosimo Cecchi.

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

9 years agosession: merge nm-session-monitor-* modules
Pavel Šimerda [Tue, 30 Jul 2013 21:09:52 +0000 (23:09 +0200)]
session: merge nm-session-monitor-* modules

Merged all session tracking modules into one source file and simplified
it substantially. Now systemd-logind and ConsoleKit support can be built
in at the same time and both are detected at runtime. This is useful on
source based as well as binary distributions.

Original patch written by Fabio Erculiani <lxnay@sabayon.org>, modified
by Pavel Šimerda <psimerda@redhat.com> and Thomas Haller <thaller@redhat.com>.

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

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agomain: don't initialize the session monitor
Pavel Šimerda [Sat, 27 Dec 2014 00:29:34 +0000 (01:29 +0100)]
main: don't initialize the session monitor

The session monitor will be initialized as soon as it's needed.

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agosession: switch code to nm_session_monitor_{,dis}connect()
Pavel Šimerda [Fri, 2 Jan 2015 21:41:00 +0000 (22:41 +0100)]
session: switch code to nm_session_monitor_{,dis}connect()

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agoauth: remove session monitor argument
Pavel Šimerda [Sat, 27 Dec 2014 00:18:15 +0000 (01:18 +0100)]
auth: remove session monitor argument

There's no need to call `nm_session_monitor_get()` individually for each
call to `nm_auth_is_subject_in_acl()`.

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agosession: switch code to nm_session_monitor_session_exists()
Pavel Šimerda [Fri, 2 Jan 2015 20:20:38 +0000 (21:20 +0100)]
session: switch code to nm_session_monitor_session_exists()

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agosession: merge nm-session-utils into nm-session-manager
Pavel Šimerda [Fri, 2 Jan 2015 19:23:48 +0000 (20:23 +0100)]
session: merge nm-session-utils into nm-session-manager

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agoconsolekit: fix memory leak on error
Pavel Šimerda [Fri, 2 Jan 2015 19:36:48 +0000 (20:36 +0100)]
consolekit: fix memory leak on error

Acked-By: Thomas Haller <thaller@redhat.com>
9 years agolibnm/tests: fix GetAccessPoints() in test-networkmanager-service.py for hidden APs
Thomas Haller [Mon, 5 Jan 2015 12:50:56 +0000 (13:50 +0100)]
libnm/tests: fix GetAccessPoints() in test-networkmanager-service.py for hidden APs

There was a bug checking for "if a.ssid():". Refactor the whole line to
use a list comprehension.

9 years agolibnm/tests: cleanup handling object paths in test-networkmanager-service.py
Thomas Haller [Mon, 5 Jan 2015 12:52:27 +0000 (13:52 +0100)]
libnm/tests: cleanup handling object paths in test-networkmanager-service.py

9 years agolibnm/tests: fix handling ByteArray in test-networkmanager-service.py for Python 3
Thomas Haller [Mon, 5 Jan 2015 12:48:39 +0000 (13:48 +0100)]
libnm/tests: fix handling ByteArray in test-networkmanager-service.py for Python 3

In Python 3, dbus.ByteArray() must be created using a byte string,
while strings obtained via DBUS are unicode strings.

This was wrong in WifiAp.__get_props() which broke the test
test_wifi_ap_added_removed().

    File "/usr/lib/python3.3/site-packages/dbus/service.py", line 707, in _message_cb
      retval = candidate_method(self, *args, **keywords)
    File "./NetworkManager/tools/test-networkmanager-service.py", line 102, in GetAll
      return self._get_dbus_properties(iface)
    File "./NetworkManager/tools/test-networkmanager-service.py", line 96, in _get_dbus_properties
      return self.__dbus_ifaces[iface]()
    File "./NetworkManager/tools/test-networkmanager-service.py", line 315, in __get_props
      props[PP_SSID] = dbus.ByteArray(self.ssid)
    TypeError: string argument without an encoding

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

9 years agodocs: fix out-of-tree build
You-Sheng Yang [Tue, 30 Dec 2014 17:23:12 +0000 (01:23 +0800)]
docs: fix out-of-tree build

When compiling NetworkManager with --enable-gtk-doc outside the
source tree, the generated documents are slightly different from
those generated in tree. This patch fixes that missed COPYING file in
$(top_builddir) and adds $(top_builddir)/libnm-util to DOC_SOURCE_DIR.

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

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
9 years agoifcfg-rh: refactor g_return statements in reader.c
Thomas Haller [Tue, 30 Dec 2014 23:08:12 +0000 (00:08 +0100)]
ifcfg-rh: refactor g_return statements in reader.c

9 years agoifcfg-rh: fix wireless_connection_from_ifcfg() to accept missing @error argument
Thomas Haller [Tue, 30 Dec 2014 20:43:10 +0000 (21:43 +0100)]
ifcfg-rh: fix wireless_connection_from_ifcfg() to accept missing @error argument

wireless_connection_from_ifcfg() did not support being called without
error argument.

    #0  0x00007fe4fa2204e9 in g_logv (log_domain=0x7fe4f0597060 "NetworkManager-ifcfg-rh", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff1c7aaf00) at gmessages.c:989
    #1  0x00007fe4fa22063f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025
    #2  0x00007fe4f057eec3 in wireless_connection_from_ifcfg (file=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", ifcfg=0x7fe4fec6f730, error=0x0) at reader.c:3431
    #3  0x00007fe4f057e2b6 in connection_from_file_full (filename=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", network_file=0x7fe4f05976aa "/etc/sysconfig/network", test_type=0x0, out_unhandled=0x7fff1c7ab1f8,
        error=0x0, out_ignore_error=0x7fff1c7ab174) at reader.c:4750
    #4  0x00007fe4f057db80 in connection_from_file (filename=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", out_unhandled=0x7fff1c7ab1f8, error=0x0) at reader.c:4834
    #5  0x00007fe4f057b4a6 in nm_ifcfg_connection_new (source=0x0, full_path=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", error=0x0) at nm-ifcfg-connection.c:119
    #6  0x00007fe4f0579c1d in _internal_new_connection (self=0x7fe4fec6cd00, path=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", source=0x0, error=0x0) at plugin.c:136
    #7  0x00007fe4f0579256 in connection_new_or_changed (self=0x7fe4fec6cd00, path=0x7fe4fec7c800 "/etc/sysconfig/network-scripts/ifcfg-Wi-Fi-1", existing=0x0, out_old_path=0x7fff1c7ab458) at plugin.c:265
    #8  0x00007fe4f0578f61 in read_connections (plugin=0x7fe4fec6cd00) at plugin.c:462
    #9  0x00007fe4f0578839 in get_connections (config=0x7fe4fec6cd00) at plugin.c:497
    #10 0x00007fe4fdc9affb in nm_system_config_interface_get_connections (config=0x7fe4fec6cd00) at settings/nm-system-config-interface.c:143
    #11 0x00007fe4fdc9764f in load_connections (self=0x7fe4fec6ca40) at settings/nm-settings.c:201
    #12 0x00007fe4fdc96d74 in nm_settings_new (error=0x7fff1c7abb18) at settings/nm-settings.c:1802
    #13 0x00007fe4fdc37146 in main (argc=1, argv=0x7fff1c7abcd8) at main.c:415

Fixes: 356849f70c72f920d1600ab98611f9f7ed10214c
Fixes: 12bfaf5a8da788ae5ed50c0c93c203250a6ecf8b

9 years agoifcfg-rh: avoid passing NULL error to connection_from_file_full()
Lubomir Rintel [Fri, 2 Jan 2015 15:10:28 +0000 (16:10 +0100)]
ifcfg-rh: avoid passing NULL error to connection_from_file_full()

It causes an assertion failure:

  (NetworkManager:20800): NetworkManager-ifcfg-rh-CRITICAL **: wireless_connection_from_ifcfg: assertion 'error != NULL' failed

Fixes: 12bfaf5a8da788ae5ed50c0c93c203250a6ecf8b

9 years agolibnm: make NMDhcp6Config inherit from NMDhcpConfig
Lubomir Rintel [Fri, 2 Jan 2015 18:32:58 +0000 (19:32 +0100)]
libnm: make NMDhcp6Config inherit from NMDhcpConfig

Otherwise it does not register the "options" property and an assertion fails
when the user prints connection that has DHCPv6 options:

  $ LIBNM_GLIB_DEBUG=properties-changed nmcli c show yolo
  ...
  libnm-Message: Property 'options' unhandled.
  ...
  (process:13522): libnm-CRITICAL **: nm_dhcp_config_get_options: assertion 'NM_IS_DHCP_CONFIG (config)' failed

9 years agodns-manager: don't replace /etc/resolv.conf installed by other tools
Pavel Šimerda [Tue, 18 Nov 2014 17:12:16 +0000 (18:12 +0100)]
dns-manager: don't replace /etc/resolv.conf installed by other tools

Resolves:

 * https://bugzilla.gnome.org/show_bug.cgi?id=732941
 * https://bugzilla.redhat.com/show_bug.cgi?id=1116999

Acked-By: Dan Williams <dcbw@redhat.com>
Acked-By: Thomas Haller <thaller@redhat.com>
9 years agodns-manager: make /etc/resolv.conf a symlink to /run/NetworkManager/resolv.conf.default
Pavel Šimerda [Tue, 18 Nov 2014 17:12:16 +0000 (18:12 +0100)]
dns-manager: make /etc/resolv.conf a symlink to /run/NetworkManager/resolv.conf.default

Related:

 * https://bugzilla.gnome.org/show_bug.cgi?id=732941
 * https://bugzilla.redhat.com/show_bug.cgi?id=1116999

Acked-By: Thomas Haller <thaller@redhat.com>
Acked-By: Dan Williams <dcbw@redhat.com>
9 years agocontrib: fix team sub-package obsoletes
Dan Williams [Mon, 22 Dec 2014 15:48:22 +0000 (09:48 -0600)]
contrib: fix team sub-package obsoletes

Team was split out between NM 0.9.10 and NM 1.0 after the other
sub-packages, so the existing obsoletes won't work for it (they
would cause all upgrades to install all sub-packages, instead
of replacing existing sub-packages without adding uninstalled
ones).  We only want to unconditionally add the team sub-package.

9 years agonmcli/bash-completion: don't allow specifying connection by apath for 'connection...
Thomas Haller [Mon, 22 Dec 2014 11:35:38 +0000 (12:35 +0100)]
nmcli/bash-completion: don't allow specifying connection by apath for 'connection modify'

The following must not be allowed:

  $ nmcli connection modify apath /org/freedesktop/NetworkManager/ActiveConnection/0

9 years agonmcli/bash-completion: fix detecting connection for connection modify
Thomas Haller [Mon, 22 Dec 2014 11:30:06 +0000 (12:30 +0100)]
nmcli/bash-completion: fix detecting connection for connection modify

Previously we would only complete connections given by ID.
The following would work:
  $ nmcli connection modify id <ID> <TAB>
  $ nmcli connection modify <ID> <TAB>
  $ nmcli connection modify uuid <UUID> <TAB>
but the following would not work:
  $ nmcli connection modify <UUID> <TAB>

9 years agopo: update Polish (pl) translation (bgo #741839)
Piotr Drąg [Sun, 21 Dec 2014 18:59:01 +0000 (19:59 +0100)]
po: update Polish (pl) translation (bgo #741839)

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

9 years agopo: fix broken Telugu (te) and Turkish (tr) translations
Piotr Drąg [Sun, 21 Dec 2014 15:44:24 +0000 (16:44 +0100)]
po: fix broken Telugu (te) and Turkish (tr) translations

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

9 years agocore: fix re-activation of connections on EXTERNAL_DOWN interfaces (bgo #741742)
Dan Williams [Fri, 19 Dec 2014 05:38:37 +0000 (23:38 -0600)]
core: fix re-activation of connections on EXTERNAL_DOWN interfaces (bgo #741742)

When userspace IPv6LL capability is compiled into NetworkManager,
during deactivation NM will toggle userspace IPv6LL in some cases.
This causes link change events in the platform, which show up
in nm-device.c::device_link_changed().

When an EXTERNAL_DOWN interface was activated, the EXTERNAL_DOWN
flag was never cleared even if the device was set IFF_UP or if
a connection was activated via D-Bus (which explicitly sets the
device up).

Second, the device_link_changed() code changed device state
whether or not IFF_UP had actually changed, it simply looked at
the current value.

Together, this caused the first activation of an EXTERNAL_DOWN
device to succeed, but the EXTERNAL_DOWN flag was never cleared
even though the activation set the device IFF_UP.  When a second
activation request came in, the device was moved to DISCONNECTED
state and IPv6LL genmode was reset, causing device_link_changed()
to run.  Since the device had EXTERNAL_DOWN and IFF_UP were still
set, nm_device_set_unmanaged_flag() code was triggered to clear
EXTERNAL_DOWN, which resulted in a state transition to UNAVAILABLE
with a reason of CONNECTION_ASSUMED.  This caused the second
activation request to fail because UNAVAILABLE devices cannot
activate connections by definition.

The fix has three parts:

1) Only change EXTERNAL_DOWN if IFF_UP actually changes, to prevent
spurious changes when something other than IFF_UP changes

2) Only clear EXTERNAL_DOWN when IFF_UP changes while the device
is UNMANAGED, since any state higher than UNMANAGED implies that
either an activation request was received (and thus the device
should be managed) or IFF_UP was set

3) Clear EXTERNAL_DOWN (without triggering state changes) when
any state higher than UNAVAILABLE is entered, since this implies
that a connection is activating or the device is no longer
IFF_UP

fixes:NetworkManager_Test108_testcase_303655

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

9 years agocontrib/fedora: add file REQUIRED_PACKAGES listing fedora packages for development
Thomas Haller [Fri, 19 Dec 2014 13:28:51 +0000 (14:28 +0100)]
contrib/fedora: add file REQUIRED_PACKAGES listing fedora packages for development

9 years agobuild: fix check-exports.sh for ppc64 arch
Thomas Haller [Fri, 19 Dec 2014 13:49:00 +0000 (14:49 +0100)]
build: fix check-exports.sh for ppc64 arch

On ppc64, `nm` reports the exported symbols as 'D' instead of 'T'.
This caused `make check` to fail.

  "D" The symbol is in the initialized data section.
  "T" The symbol is in the text (code) section.

9 years agolibnm/tests: make tested IPv4 addresses non-palindromic
Thomas Haller [Fri, 19 Dec 2014 12:16:30 +0000 (13:16 +0100)]
libnm/tests: make tested IPv4 addresses non-palindromic

For IPv4 addresses, the binary representation is in network-order,
contrary to host-order. It's better to choose addresses for testing
that are differently on big and little endian systems.

9 years agolibnm/tests: fix build failure on big-endian machines
Thomas Haller [Fri, 19 Dec 2014 11:46:03 +0000 (12:46 +0100)]
libnm/tests: fix build failure on big-endian machines

`make check` fails:

  make  check-TESTS
  make[4]: Entering directory `/builddir/build/BUILD/NetworkManager-1.1.0/libnm-core/tests'
  ...
  /core/general/test_setting_802_1x_changed_signal: OK
  /core/general/test_setting_ip4_gateway: **
  ERROR:test-general.c:3652:test_setting_ip4_gateway: assertion failed (nm_setting_ip_config_get_gateway (s_ip4) == "192.168.1.1"): ("1.1.168.192" == "192.168.1.1")
  /bin/sh: line 5: 44957 Aborted                 (core dumped) ${dir}$tst

9 years agocontrib/rpm: exclude device plugins for ADSL and Wi-Fi on s390
Thomas Haller [Fri, 19 Dec 2014 12:30:39 +0000 (13:30 +0100)]
contrib/rpm: exclude device plugins for ADSL and Wi-Fi on s390

s390 does not enable several device plugins, but ADSL and Wi-Fi
plugins are still build. They must be excluded in the spec file,
otherwise rpmbuild fails.

This partly reverts commit 1f631cd08d0f01cd118e7222822518d62916f117.

  Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/NetworkManager-1.1.0-11242.9709d009d5.el7.s390x
  RPM build errors:
  error: Installed (but unpackaged) file(s) found:
     /usr/lib64/NetworkManager/libnm-device-plugin-adsl.so
     /usr/lib64/NetworkManager/libnm-device-plugin-wifi.so
      Installed (but unpackaged) file(s) found:
     /usr/lib64/NetworkManager/libnm-device-plugin-adsl.so
     /usr/lib64/NetworkManager/libnm-device-plugin-wifi.so
  Child returncode was: 1

9 years agocontrib/rpm: fix spec file for s390/s390x
Thomas Haller [Fri, 19 Dec 2014 11:00:34 +0000 (12:00 +0100)]
contrib/rpm: fix spec file for s390/s390x

On s390/s390x we would disable hardware plugins, especially %{with_bluetooth} and
%{with_wwan}. Depending on that we would set 'BuildRequires: ModemManager-glib-devel'.

This was not corresponding to the '--with-modem-manager-1' configure
option, hence we did not have ModemManager-glib-devel, but
'--with-modem-manager-1=yes'

9 years agocontrib/rpm: fix --srpm option of build_clean.sh
Thomas Haller [Fri, 19 Dec 2014 11:22:34 +0000 (12:22 +0100)]
contrib/rpm: fix --srpm option of build_clean.sh

Forgot to export the $BUILDTYPE variable. Hence --srpm did not
work.

9 years agopo: update Tamil (ta) translation (bgo #741752)
Shantha kumar [Fri, 19 Dec 2014 10:40:15 +0000 (10:40 +0000)]
po: update Tamil (ta) translation (bgo #741752)

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

9 years agopo: update Turkish (tr) translation (bgo #741737)
Necdet Yücel [Fri, 19 Dec 2014 00:35:08 +0000 (00:35 +0000)]
po: update Turkish (tr) translation (bgo #741737)

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

9 years agolibnm-util, libnm-glib: bump sonames for 1.0
Dan Winship [Thu, 18 Dec 2014 18:23:37 +0000 (13:23 -0500)]
libnm-util, libnm-glib: bump sonames for 1.0

libnm-util.so.2.7.0, libnm-glib.so.4.9.0

9 years agodocs: misc small fixes
Dan Winship [Thu, 18 Dec 2014 17:44:57 +0000 (12:44 -0500)]
docs: misc small fixes

Cleans up all of the warnings that aren't overly annoying to clean up.

9 years agorelease: update NEWS
Dan Williams [Thu, 18 Dec 2014 18:06:52 +0000 (12:06 -0600)]
release: update NEWS

9 years agogitignore: do not ignore test artifacts that should be cleaned up by the test themselves
Thomas Haller [Thu, 18 Dec 2014 17:42:45 +0000 (18:42 +0100)]
gitignore: do not ignore test artifacts that should be cleaned up by the test themselves

9 years agoifcfg-rh/tests: remove unused variable
Thomas Haller [Thu, 18 Dec 2014 17:43:16 +0000 (18:43 +0100)]
ifcfg-rh/tests: remove unused variable

9 years agoifcfg-rh/tests: remove test artifact 'route6-Test_Write_Wired_Static'
Thomas Haller [Thu, 18 Dec 2014 17:45:35 +0000 (18:45 +0100)]
ifcfg-rh/tests: remove test artifact 'route6-Test_Write_Wired_Static'

This left-over file breaks `make distcheck`.

Fixes: 1600ed9c6804c097dea96eaeea831224b20d1412

9 years agocore: don't assume connection if device is EXTERNAL_DOWN (bgo #741694)
Dan Williams [Thu, 18 Dec 2014 07:57:26 +0000 (08:57 +0100)]
core: don't assume connection if device is EXTERNAL_DOWN (bgo #741694)

https://bugzilla.gnome.org/show_bug.cgi?id=741694#c1

Fixes:Beaker:NetworkManager_Test41_connection_removal_of_disapperared_device

9 years agobuild: embed git-commit-id as string inside libnm binary
Thomas Haller [Tue, 16 Dec 2014 23:15:27 +0000 (00:15 +0100)]
build: embed git-commit-id as string inside libnm binary

In the 'configure.ac' script we already detect the git commit id
for the current source version. When creating a tarball, it is also
included inside the generated 'configure' script.

Add the commit id as a  static string to nm-utils.c. That way, having
a build of libnm.so or NetworkManager, you can quickly find the
corresponding git commit:

    strings src/NetworkManager | grep NM_GIT_SHA

Note that this only works after a new `autogen.sh` run. Only rebuilding
is not enough. Hence, you must rebuild all to ensure that the correct
commit id is embedded.

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

9 years agoall: move STRLEN() macro to global header nm-utils-internal.h
Thomas Haller [Wed, 17 Dec 2014 09:38:46 +0000 (10:38 +0100)]
all: move STRLEN() macro to global header nm-utils-internal.h

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

9 years agologging: pass file:line as separate arguments to _nm_log()
Thomas Haller [Wed, 17 Dec 2014 08:30:35 +0000 (09:30 +0100)]
logging: pass file:line as separate arguments to _nm_log()

Previously, we would only pass one argument @loc to _nm_log()
which was set to G_STRLOC.
That has the disadvantage, that for every logging line the binary
contains an individual string __FILE__:__LINE__.

By splitting up @loc into @file and @line, we reduce the number
of strings in the NetworkManager binary by about 50k.

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

9 years agodevice: fix assertion in nm_device_slave_notify_release() logging the master device
Thomas Haller [Tue, 16 Dec 2014 23:40:05 +0000 (00:40 +0100)]
device: fix assertion in nm_device_slave_notify_release() logging the master device

    #0  0x00007f6c3aed34e9 in g_logv (log_domain=0x7f6c3ea7341c "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff0a33fb60) at gmessages.c:989
    #1  0x00007f6c3aed363f in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at gmessages.c:1025
    #2  0x00007f6c3e8ead4f in nm_device_get_iface (self=0x0) at devices/nm-device.c:502
    #3  0x00007f6c3e904f59 in nm_device_slave_notify_release (self=0x7f6c3fb48e60, reason=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:1618
    #4  0x00007f6c3e8ed69f in nm_device_release_one_slave (self=0x7f6c3fb22670, slave=0x7f6c3fb48e60, configure=1, reason=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:968
    #5  0x00007f6c3e904bf7 in slave_state_changed (slave=0x7f6c3fb48e60, slave_new_state=NM_DEVICE_STATE_UNMANAGED, slave_old_state=NM_DEVICE_STATE_ACTIVATED, reason=NM_DEVICE_STATE_REASON_REMOVED, self=0x7f6c3fb22670)
        at devices/nm-device.c:1368
    #6  0x00007f6c39829d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
    #7  0x00007f6c398296bc in ffi_call (cif=cif@entry=0x7fff0a340070, fn=0x7f6c3e9049d0 <slave_state_changed>, rvalue=0x7fff0a33ffe0, avalue=avalue@entry=0x7fff0a33ff60) at ../src/x86/ffi64.c:522
    #8  0x00007f6c3b1bfad8 in g_cclosure_marshal_generic (closure=0x7f6c3fb5c8c0, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
    #9  0x00007f6c3b1bf298 in g_closure_invoke (closure=0x7f6c3fb5c8c0, return_value=return_value@entry=0x0, n_param_values=4, param_values=param_values@entry=0x7fff0a340270, invocation_hint=invocation_hint@entry=0x7fff0a340210)
        at gclosure.c:777
    #10 0x00007f6c3b1d135d in signal_emit_unlocked_R (node=node@entry=0x7f6c3faf5d10, detail=detail@entry=0, instance=instance@entry=0x7f6c3fb48e60, emission_return=emission_return@entry=0x0,
        instance_and_params=instance_and_params@entry=0x7fff0a340270) at gsignal.c:3586
    #11 0x00007f6c3b1d90f2 in g_signal_emit_valist (instance=instance@entry=0x7f6c3fb48e60, signal_id=signal_id@entry=64, detail=detail@entry=0, var_args=var_args@entry=0x7fff0a3404a8) at gsignal.c:3330
    #12 0x00007f6c3b1d98f8 in g_signal_emit_by_name (instance=0x7f6c3fb48e60, detailed_signal=0x7f6c3ea70f83 "state-changed") at gsignal.c:3426
    #13 0x00007f6c3e8f894f in _set_state_full (self=0x7f6c3fb48e60, state=NM_DEVICE_STATE_UNMANAGED, reason=NM_DEVICE_STATE_REASON_REMOVED, quitting=0) at devices/nm-device.c:7486
    #14 0x00007f6c3e8f0706 in nm_device_state_changed (self=0x7f6c3fb48e60, state=NM_DEVICE_STATE_UNMANAGED, reason=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:7623
    #15 0x00007f6c3e8f808b in nm_device_set_unmanaged (self=0x7f6c3fb48e60, flag=NM_UNMANAGED_INTERNAL, unmanaged=1, reason=NM_DEVICE_STATE_REASON_REMOVED) at devices/nm-device.c:6652
    #16 0x00007f6c3e9943d0 in remove_device (manager=0x7f6c3fb20150, device=0x7f6c3fb48e60, quitting=0, allow_unmanage=1) at nm-manager.c:752
    #17 0x00007f6c3e995c29 in platform_link_cb (platform=0x7f6c3fa7a870, ifindex=73, plink=0x7fff0a341260, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL, user_data=0x7f6c3fb20150) at nm-manager.c:2182
    #18 0x00007f6c39829d8c in ffi_call_unix64 () at ../src/x86/unix64.S:76
    #19 0x00007f6c398296bc in ffi_call (cif=cif@entry=0x7fff0a340bc0, fn=0x7f6c3e995b60 <platform_link_cb>, rvalue=0x7fff0a340b30, avalue=avalue@entry=0x7fff0a340ab0) at ../src/x86/ffi64.c:522
    #20 0x00007f6c3b1bfad8 in g_cclosure_marshal_generic (closure=0x7f6c3fb14cf0, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x0) at gclosure.c:1454
    #21 0x00007f6c3b1bf298 in g_closure_invoke (closure=0x7f6c3fb14cf0, return_value=return_value@entry=0x0, n_param_values=5, param_values=param_values@entry=0x7fff0a340dc0, invocation_hint=invocation_hint@entry=0x7fff0a340d60)
        at gclosure.c:777
    #22 0x00007f6c3b1d135d in signal_emit_unlocked_R (node=node@entry=0x7f6c3fa76f00, detail=detail@entry=0, instance=instance@entry=0x7f6c3fa7a870, emission_return=emission_return@entry=0x0,
        instance_and_params=instance_and_params@entry=0x7fff0a340dc0) at gsignal.c:3586
    #23 0x00007f6c3b1d90f2 in g_signal_emit_valist (instance=instance@entry=0x7f6c3fa7a870, signal_id=signal_id@entry=2, detail=detail@entry=0, var_args=var_args@entry=0x7fff0a341018) at gsignal.c:3330
    #24 0x00007f6c3b1d98f8 in g_signal_emit_by_name (instance=0x7f6c3fa7a870, detailed_signal=0x7f6c3ea5f1fa "link-changed") at gsignal.c:3426
    #25 0x00007f6c3e92412a in announce_object (platform=0x7f6c3fa7a870, object=0x7f6c3fbb6fd0, change_type=NM_PLATFORM_SIGNAL_REMOVED, reason=NM_PLATFORM_REASON_EXTERNAL) at platform/nm-linux-platform.c:1625
    #26 0x00007f6c3e92b0f9 in event_notification (msg=0x7f6c3fa946f0, user_data=0x7f6c3fa7a870) at platform/nm-linux-platform.c:1986
    #27 0x00007f6c3c35812f in nl_cb_call (msg=<optimized out>, type=<optimized out>, cb=<optimized out>) at ../include/netlink-private/netlink.h:141
    #28 recvmsgs (cb=0x7f6c3fa7a620, sk=0x7f6c3fa7a710) at nl.c:952
    #29 nl_recvmsgs_report (sk=0x7f6c3fa7a710, cb=0x7f6c3fa7a620) at nl.c:1003
    #30 0x00007f6c3c3584f9 in nl_recvmsgs (sk=<optimized out>, cb=<optimized out>) at nl.c:1027
    #31 0x00007f6c3e929dca in event_handler (channel=0x7f6c3fa78810, io_condition=G_IO_IN, user_data=0x7f6c3fa7a870) at platform/nm-linux-platform.c:4127
    #32 0x00007f6c3aecc2a6 in g_main_dispatch (context=0x7f6c3fa68490) at gmain.c:3066
    #33 g_main_context_dispatch (context=context@entry=0x7f6c3fa68490) at gmain.c:3642
    #34 0x00007f6c3aecc628 in g_main_context_iterate (context=0x7f6c3fa68490, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
    #35 0x00007f6c3aecca3a in g_main_loop_run (loop=0x7f6c3fa68550) at gmain.c:3907
    #36 0x00007f6c3e8e9fff in main (argc=1, argv=0x7fff0a341c88) at main.c:483

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

9 years agoifcfg-rh: merge branch 'ifcfg-rh-cleanup-bgo741659'
Dan Winship [Thu, 18 Dec 2014 16:35:22 +0000 (11:35 -0500)]
ifcfg-rh: merge branch 'ifcfg-rh-cleanup-bgo741659'

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

9 years agoifcfg-rh/tests: drop out_*file args from connection_from_file_test()
Dan Winship [Tue, 16 Dec 2014 15:33:16 +0000 (10:33 -0500)]
ifcfg-rh/tests: drop out_*file args from connection_from_file_test()

The out_keyfile, out_routefile, and out_route6file args were just
based on trivial calls to utils.h functions, and could just as easily
be done by the caller directly. So do that.

9 years agoifcfg-rh/tests: removed unused connection_from_file_test() args
Dan Winship [Tue, 16 Dec 2014 14:58:35 +0000 (09:58 -0500)]
ifcfg-rh/tests: removed unused connection_from_file_test() args

Don't pass &keyfile, &routefile, and &route6file if we aren't going to
use the return value.

Don't pass &unmanaged if we aren't going to check it. (And when we do
check it, don't g_free() it if we've asserted that it's NULL.)