Commit Graph

13873 Commits

Author SHA1 Message Date
Lubomir Rintel
c1c3d7e145 device: translate NM_DEVICE_STATE_REASON_UNKNOWN to "unknown" 2015-04-08 09:59:24 +02:00
Beniamino Galvani
8af18182f3 build: move systemd DHCP files to a common directory
Create a new directory 'src/systemd' and move systemd DHCP files
there. This new directory will contain all the files imported from
systemd.
2015-04-08 09:17:51 +02:00
Thomas Haller
7914a6b6bd dispatcher: fix crash due to wrong signature of variant for argument of "Action" D-Bus call
Fixes: 8da83a2ba3

https://bugzilla.gnome.org/show_bug.cgi?id=747456
2015-04-07 19:18:15 +02:00
Dan Winship
773f047eef libnm-core: fix VPN error domain (bgo #745997)
In theory, NM_VPN_PLUGIN_ERROR should have names under
org.freedesktop.NetworkManager.VPN.Plugin, but for historical reasons,
it's actually org.freedesktop.NetworkManager.VPN.Error.
2015-04-07 11:30:36 -04:00
Dan Winship
37a5bfcbeb supplicant-manager, wifi: (trivial) fix signal argument types
A few places in the NMSupplicantInterface API and in NMDeviceWifi's
use of it were still using "GHashTable *properties" where they should
have been using "GVariant *properties". (This didn't cause any actual
problems because nothing was looking at those arguments.)

(Also fix a comment typo.)
2015-04-06 16:13:03 -04:00
Thomas Haller
b5b568a49a libnm-core: add libnm-core/nm-dbus-utils.c to POTFILES.in
Fixes: 9668bfd682
2015-04-05 11:17:09 +02:00
Dan Winship
7b17faaa3f dispatcher: belatedly remove no-longer-used dbus-glib define 2015-04-04 08:23:48 -04:00
Dan Winship
96a0a6bcaa core: merge branch 'more-gdbus-bgo746901'
https://bugzilla.gnome.org/show_bug.cgi?id=746901
2015-04-03 17:01:47 -04:00
Dan Williams
689bf383e9 firewall: clean up call completion and use GCancellable 2015-04-03 16:58:41 -04:00
Dan Winship
5a1b6b4bbd core: port NMManager's aipd proxy to GDBus 2015-04-03 16:58:41 -04:00
Dan Winship
473cfec01c bluetooth: port bluez4 code to gdbus 2015-04-03 16:58:40 -04:00
Dan Winship
8da83a2ba3 core: port the daemon side of the dispatcher to gdbus 2015-04-03 16:58:40 -04:00
Dan Winship
da7d3ed5e1 core: port nm-sleep-monitor-upower to gdbus 2015-04-03 16:58:40 -04:00
Dan Winship
2e8acfa9d8 core: trivial NMSleepMonitor fixes
Fix nm-sleep-monitor-upower.c indentation, and fix the type of the
(unused) first argument in NMManager's NMSleepMonitor signal handlers.
2015-04-03 16:58:40 -04:00
Dan Winship
5c9032cb5d firewall: port nm-firewall-manager to gdbus 2015-04-03 16:58:40 -04:00
Dan Winship
9f42c6df9a core: use _nm_dbus_error_has_name() 2015-04-03 16:58:40 -04:00
Dan Winship
ec6f350f44 libnm-core: add _nm_dbus_error_has_name()
Add a method for checking the D-Bus error name of an error.
2015-04-03 16:58:40 -04:00
Dan Winship
9926ba376a libnm, core: use typechecked proxy_call methods 2015-04-03 16:58:40 -04:00
Dan Winship
9668bfd682 libnm-core: add _nm_dbus_proxy_call_sync(), _nm_dbus_proxy_call_finish()
Add versions of g_dbus_proxy_call_sync() and
g_dbus_proxy_call_finish() that also typecheck the response and return
an error if it is incorrect.
2015-04-03 16:58:40 -04:00
Dan Winship
1a0bc83c39 libnm, core: use _nm_dbus_signal_connect() 2015-04-03 16:58:40 -04:00
Dan Winship
4e61f4bf35 libnm-core: add _nm_dbus_signal_connect()
Add _nm_dbus_signal_connect(), for connecting to D-Bus signals on a
GDBusProxy, with typechecking and pre-parsing of the parameters
variant.
2015-04-03 16:58:40 -04:00
Lubomir Rintel
353570224f device,cli: allow re-activation of already active connections (bgo #730492)
https://bugzilla.gnome.org/show_bug.cgi?id=730492
https://bugzilla.redhat.com/show_bug.cgi?id=1182085
2015-04-03 19:00:43 +02:00
Lubomir Rintel
0e8a14cc5f cli: don't look up a device for activation request unless we have to
Let the server decide which device to use if the user didn't explicitly
specify the interface, wireless access point or a wimax nsp.

The server will just reuse the device for an already active connection
or potentially do a better guess.

https://bugzilla.gnome.org/show_bug.cgi?id=730492
2015-04-03 18:59:33 +02:00
Lubomir Rintel
4cb97cf66f manager: remove a connection from device if we're activating it on another device
The connection now might be being activated on another device. Defer the
removal until we're sure the activation request will proceed and only add the
active connection afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=730492
2015-04-03 18:59:33 +02:00
Lubomir Rintel
6fc3736c7a manager: pick an available device if none was specified upon connection activation
This offloads some complexity from the client.

https://bugzilla.gnome.org/show_bug.cgi?id=730492
2015-04-03 18:59:33 +02:00
Lubomir Rintel
6e94f302b2 manager: reuse a device connection is active on if none was given upon activation
If a connection is already active let's keep it on the same device. This makes
it possible to reactivate a connection without client knowing which device is
it active on.

https://bugzilla.gnome.org/show_bug.cgi?id=730492
2015-04-03 18:59:33 +02:00
Dan Williams
568a8d1da9 bridge/bond/team: device availability shouldn't depend on IFF_UP (bgo #746918)
The merge of lr/udev-unmanaged-fd731014 made all devices wait until
udev found them, but that makes these three device types fail activate
when created by NM itself.

Since their availability depended on IFF_UP, they could not be
activated (eg, 'nmcli con up team0') until they were IFF_UP.  But
when they are created by NM, although NM knows the ifindex the
platform ignores the interface until udev finds it.  Thus immediately
after creating the interface in _internal_activate_device() it
won't be known to the platform, so the nm_device_is_available()
check that controls whether the device moves to DISCONNECTED
will fail.  This prevents any activation and emits the message:

"Connection 'foo' is not available on the device %s at this time."

because the device is still in the UNAVAILABLE state.

danw asked why we care about IFF_UP for these devices, and I can't
remember why, and I don't think it makes sense to require now.

https://bugzilla.gnome.org/show_bug.cgi?id=746918
2015-04-02 15:10:43 -05:00
Dan Williams
4c9cdce630 team: respawn teamd instead of exiting (rh #1145988) (bgo #745903) 2015-04-02 14:45:14 -05:00
Dan Williams
a8299f6ae9 team: ratelimit teamd spawning 2015-04-02 14:44:41 -05:00
Dan Williams
24a764e831 team: respawn teamd when it exits instead of failing activation (rh #1145988)
teamd can recover interface state on its own, so if it died unexpectedly
we don't need to fail the device.  Also, if for some reason a teamd is
already up and running when activating the interface, we can ask for
its configuration and if it has the same configuration we are about to
use, just talk to the existing copy instead of killing it.
2015-04-02 14:44:31 -05:00
Bernd Edlinger
1282b468bd wifi: clear WPAS_REMOVED_TAG when scanning Wi-Fi AP
(cherry picked from commit 47c505523c72b6454dec4681c0edda535c3a2e91)

https://bugzilla.gnome.org/show_bug.cgi?id=733105
2015-04-02 17:42:58 +02:00
Lubomir Rintel
0f71335d52 device: use UNMANAGED reason instead of REMOVED when unmanaging devices upon quit
Since f85513b (device: do not touch sysctls after the device was removed) the
device is not unconfigured/cleaned up when it's removed. When we're quitting
the device is not actually removed, we're just unmanaging it -- let's just
use a different reason so that the cleanup runs.

Fixes: f85513b8e4
2015-04-02 11:19:55 -04:00
Beniamino Galvani
fa19fc0a7a build: fix compile warnings in DNS manager
Fixes the following warnings in nm-dns-manager.c with NETCONFIG_PATH set:

  dns-manager/nm-dns-manager.c: In function 'dispatch_netconfig':
  dns-manager/nm-dns-manager.c:313:2: warning: implicit declaration of function 'waitpid' [-Wimplicit-function-declaration]
    ret = waitpid (pid, NULL, 0);
    ^
  dns-manager/nm-dns-manager.c:271:14: warning: unused variable 'tmp' [-Wunused-variable]
    char *str, *tmp;
                ^
  dns-manager/nm-dns-manager.c:329:13: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
    return ret > 0;
               ^
2015-04-01 15:52:24 +02:00
Beniamino Galvani
3db2e9d013 build: fix compile error in DNS manager
Fixes the following error in nm-dns-manager.c with NETCONFIG_PATH set:

  dns-manager/nm-dns-manager.c:320:4: error: too many arguments to function 'g_set_error_literal'
      g_set_error_literal (error,
2015-04-01 15:52:21 +02:00
Lubomir Rintel
63514d7a41 dbus-manager: disconnect thre private server before destroying it
Fixes a dbus warning: "this watch should have been invalidated"
2015-04-01 14:59:16 +02:00
Lubomir Rintel
dc1928a0d0 device: progress the device activation if it has a valid assumed connection
If we detect a LL address and this not decide to readd it, don't stop at
ip-config; progress to ip-check.

Fixes: 396dc2b3b4
2015-04-01 14:59:16 +02:00
Jiří Klimeš
b6f5f03033 crypto: only use gnutls crypto API, remove libgcrypt dependency (bgo #730294)
We don't need libgcrypt, because gnutls provides an API for encryption and
hashing. (Anyway gnutls itself now uses nettle instead of libgcrypt).

https://bugzilla.gnome.org/show_bug.cgi?id=730294
2015-04-01 13:23:45 +02:00
Thomas Haller
10cde91f10 core: add "fatal-warnings" option to NM_DEBUG
NM already understands the command line argument --g-fatal-warnings
which causes setting of g_log_set_always_fatal().

Also interpret the "fatal-warnings" token in NM_DEBUG environment
variable and in main.debug configuration setting.

Usage hint: either set

  $ export NM_DEBUG=RLIMIT_CORE,fatal-warnings

or add the following section to NetworkManager.conf

    [main]
    debug=RLIMIT_CORE,fatal-warnings

https://mail.gnome.org/archives/networkmanager-list/2015-March/msg00093.html
2015-04-01 10:58:28 +02:00
Jiří Klimeš
d767fb160c platform: load libnl-3.so.200, not libnl-3.so (rh #1205195)
libnl-3.so link is only present in devel package (libnl3-devel).

https://bugzilla.redhat.com/show_bug.cgi?id=1205195
2015-03-30 11:41:17 +02:00
Thomas Haller
a928ff860f libnl/trivial: add code comment to NM_UTILS_UUID_NS
Clearify, that the value was choosen arbitrarily.
2015-03-30 10:46:49 +02:00
Christian Kirbach
1d0a50778c po: update German (de) translation (bgo #746855)
https://bugzilla.gnome.org/show_bug.cgi?id=746855
2015-03-30 10:39:20 +02:00
Thomas Haller
af060e7c22 contrib/fedora: update REQUIRED_PACKAGES file with perl-YAML package 2015-03-29 13:21:16 +02:00
Dan Williams
a4c3973a84 merge: respawn DNS plugin children if they quit unexpectedly (bgo #728342) 2015-03-27 16:19:33 -05:00
Dan Williams
09a05f6c3e dns: refresh DNS if plugin child quits unexpectedly (bgo #728342)
If the child dies, or something kills the child externally, refresh
DNS which should respawn the child, similar to what we do with
wpa_supplicant, teamd, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=728342
2015-03-27 16:19:14 -05:00
Dan Williams
06f25a3ec7 dns: ensure that update_dns() always returns a GError on failure
Callers may expect this, so make sure we do it.
2015-03-27 16:19:13 -05:00
Dan Williams
cc8d9f778c dns: refactor building IP config lists for plugins (bgo #728342)
Don't bother building the lists if no DNS plugins are enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=728342
2015-03-27 16:17:10 -05:00
Dan Williams
452c224656 dns: kill plugin child synchronously to avoid restart race (rh #1161232) (bgo #728342)
NM was killing the dnsmasq local caching nameserver process and immediately
starting a new one, and new process couldn't bind to 127.0.0.1 because the
old one hadn't quit yet.  Thus the new process quit, and the user was
left with no split DNS at all.

While this does introduce more synchronous waiting into the connection
process, it's not that much time and NM will kill dnsmasq if it hasn't
quit after 1 second.  The longer-term fix is to use dnsmasq's D-Bus
interface to update DNS without respawning it.

https://bugzilla.gnome.org/show_bug.cgi?id=728342
https://bugzilla.redhat.com/show_bug.cgi?id=1161232
2015-03-27 16:17:10 -05:00
Dan Williams
d997cde995 merge: use dev_id when constructing interface identifiers (rh #1101809)
Some devices (s390 and ipvlan) use the same MAC address for
different interfaces, but dev_id differentiates them.  So we
must use dev_id to avoid IID conflicts.

https://bugzilla.redhat.com/show_bug.cgi?id=1101809
2015-03-27 15:15:29 -05:00
Dan Williams
99a6201264 core: use dev_id when calculating the interface IPv6 IID (rh #1101809)
Some device types (s390 OSA and ipvlan) can use the same link-layer address
for multiple virtual interfaces, and the kernel used the dev_id property
to differentiate these devices when constructing the IID.  NM should do
this too to prevent IID clashes.

https://bugzilla.redhat.com/show_bug.cgi?id=1101809
2015-03-27 15:11:34 -05:00
Dan Williams
25a286e999 platform: add nm_platform_link_get_dev_id()
Some devices (s390 OSA and ipvlan) use the same link layer address
for different interfaces, and dev_id is what differentiates them.
2015-03-27 15:11:34 -05:00