Commit Graph

7207 Commits

Author SHA1 Message Date
Lubomir Rintel
224acba8f6 cli,vpn: merge branch 'lr/nm-1-0-fixes'
Fixes for various issues identified during 1.0 testing.

https://bugzilla.gnome.org/show_bug.cgi?id=740135
2014-11-20 16:12:21 +01:00
Lubomir Rintel
c83b40aca7 device: Remove unmanaged slaves from master when they disappear
We've previously been just watching for state changes into UNMANAGED state. No
state change is emitted upon removal of a device which is already unmanaged.

https://bugzilla.gnome.org/show_bug.cgi?id=737659
2014-11-20 14:43:17 +01:00
Dan Williams
5de8a0d3a7 platform: stop using private kernel tun device flags (bgo #740380)
The TUN_* flags are going to be deprecated upstream in the kernel
so we might as well stop using them.

https://lkml.org/lkml/2014/11/19/460

https://bugzilla.gnome.org/show_bug.cgi?id=740380
2014-11-19 18:39:08 -06:00
Thomas Haller
a0f81f266b policy: enforce absence of default route on never-default VPN connections
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:33 +01:00
Thomas Haller
308a5e7953 policy: fix handling managed devices without default route
Before, we would only track a device in NMDefaultRouteManager
if it had a default route. Otherwise the entry for the device
was removed.

That was wrong, because having no entry meant that the interface
is assumed and hence we would not touch the interface. Instead we must
esplicitly track devices without default route to know when an interface
has no default route.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:33 +01:00
Thomas Haller
815e67a61f policy: sort default routes by metrics before adding them
It's better to add the more important routes first. Otherwise there
might be a short time when a lower priority route has precedence.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
1f5f576c33 policy: pick up externally configured default routes for managed interfaces
The previous commit made NM enforce the default route on interfaces for
which NM manages a default route.

For interfaces that are configured never-default, NM will now pick up
any externally configured default route, as if it was managed by NM.
This is important, because NMDefaultRouteManager needs a notion of which
is the best device. Without this change, it was agnostic to default routes
on managed, never-default interfaces.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
16b0ddb66d policy: resync routes on platform change events
Monitor default routes from platform, and resync the default routes
on changes.

For one, this fixes the following use-case: have an assumed device em1
with two routes of metric 20 and 21. Activate em2, which will get effective
metric 22.
When externally removing route em1/20, em2 would resync the effective metric to
20. This is correct and already worked before. However, when deleting em1/21,
nothing happened. With this change, em2 would resync to metric 21 to fill the gap.

However this commit has much bigger effects: whenever the user externally adds
a default route to an interface for which NM manages an default route, NM will
delete it.
Also, when deleting the default route (managed by NM), NM would readd
it. Effectivly, the user can no longer mess with the default route on
interfaces for which it manages the default route.

If the connection is configured never-default, the user still can add
default routes and NM will not touch them.

Obviously, this has no effect for assumed devices either and the user
can externally add and remove default routes as he wishes.

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

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
b4b67c47f1 policy: consider additional assumed routes when synchronizing the default route
Don't only consider the best route of assumed devices when syncing the route
metrics. This fixes the following scenario:

Have em1 assumed, with two default routes (metric 20 and 21).
When activating em2, NMDefaultRouteManager would  have determined
21 as the effective metric, thus replacing the assumed route of em1.

Since we don't want to touch assumed interfaces, it is wrong to
replace their default routes.

Instead, keep track of all the assumed default routes and consider their
metrics when choosing effective_metric.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
6d4bb29781 policy: minor refactoring in NMDefaultRouteManager to access routes generically
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
57dd4a125b device: only add default route when having any addresses
This fixes the failure to add a default route because no
addresses are configured yet.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
462456f255 policy: remove redundant remove_default_route() functions from NMDefaultRouteManager
When calling update_default_route(), NMDefaultRouteManager will look at the
source, and determine whether it has a default route or not. For example
for device sources, this means calling nm_device_get_ip4_default_route().

If the source indicates that it has no default route, the effect of
calling update_default_route() is the same as calling
remove_default_route() (hence, remove() can be replaced by update()).

If the source however still indicates a default route, the behavior
would be different. This case would be an undesired inconsistancy,
because source and NMDefaultRouteManager would disagree of whether
the source has a default route.
Source must always properly indicate whether it has a default route
or not, hence this situation does not arise.

Hence it is always better to call update().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
393f213c3b policy: remove unused @do_sync argument from NMDefaultRouteManager functions
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
825885d5b1 policy: minor fix when having multiple default routes with metric MAXUINT32
The case of having a metric MAXUINT32 is special, because in face of
multiple default routes with the same metric, NMDefaultRouteManager
cannot reduce the effective metric (because there is no lower priority
value).

This case works already correct, just when adding such a default route,
ensure that we add it to the *first* entry.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:32 +01:00
Thomas Haller
a43ed6cb80 policy: refactor NMDefaultRouteManager to use union type NMPlatformIPXRoute
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 22:55:31 +01:00
Lubomir Rintel
282d9b0e10 vpn: Propagate daemon exec error correctly
NetworkManager[31624]: <warn>  VPN service 'openvpn': could not launch the VPN service. error: (8) Failed to execute child process "/usr/local/libexec/nm-openvpn-service" (No such file or directory).
**
NetworkManager:ERROR:nm-manager.c:3094:_activation_auth_done: assertion failed: (error)
2014-11-19 19:51:44 +01:00
Thomas Haller
81446b5ad3 platform: add typedef for unions NMPlatformIPXAddress and NMPlatformIPXRoute
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 19:51:36 +01:00
Dan Winship
4f2c553172 dhcp: Simplify nm-dhcp-systemd lease-handling code
An sd_dhcp_lease will always have an associated address, netmask, and
lifetime, so we don't have to check for errors when fetching them.
(The systemd code will fill in a default netmask if the server didn't
provide one; nm-dhcp-systemd's code to do that itself was redundant
and unused.)

Also, log the expiration time and NTP servers, for consistency with
everything else.
2014-11-19 12:03:03 -05:00
Dan Winship
7bf7ebc470 dhcp: fix startup warnings with dhcp=internal
If asked to read a file that doesn't exist, sd_dhcp_lease_load()
returns 0 (success) without setting the out lease argument. So we need
to check both the return status and the lease before proceeding.
2014-11-19 12:03:03 -05:00
Dan Winship
71b676590c dhcp: fix systemd-dhcp's writing of routes in lease file
inet_ntoa() uses a static buffer, so you can't call it twice in the
same fprintf() call.

https://bugs.freedesktop.org/show_bug.cgi?id=86438
2014-11-19 12:03:03 -05:00
Dan Winship
e30b07149f dhcp: update nm-dhcp-systemd code for system-dhcp re-import
Some of the patches we proposed were committed in slightly different
form.
2014-11-19 12:02:17 -05:00
Dan Winship
74678cf56b dhcp: re-fix system-dhcp code after re-import 2014-11-19 12:02:12 -05:00
Dan Winship
1ea0dd41b0 Merge branch 'master' into dhcp-merge
Conflicts:
	src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c
	src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-lease.c
	src/dhcp-manager/systemd-dhcp/src/shared/fileio.c
	src/dhcp-manager/systemd-dhcp/src/shared/util.c
	src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-client.h
	src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-lease.h
2014-11-19 12:02:00 -05:00
Dan Winship
e2e4637cf4 dhcp: update systemd DHCP code
This is a direct dump from systemd git on 2014-11-19, git commit
a4962513.  Only relevant files were included.

    SYSTEMD_DIR=../systemd
    COMMIT=a4962513c555fe3ac4b5bebf97a71701361a45b0

    (
       cd "$SYSTEMD_DIR"
       git checkout "$COMMIT"
       git clean -fdx
    )
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-lease-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-lease-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-network.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-network.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-option.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-option.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-packet.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-packet.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp-protocol.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-protocol.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-lease-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-lease-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-network.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-network.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-option.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-option.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/dhcp6-protocol.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp6-protocol.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/network-internal.h ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/network-internal.h
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-client.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp-lease.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-lease.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-client.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c
    /bin/cp "$SYSTEMD_DIR"/src/libsystemd-network/sd-dhcp6-lease.c ./src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-lease.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/async.h ./src/dhcp-manager/systemd-dhcp/src/shared/async.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.c ./src/dhcp-manager/systemd-dhcp/src/shared/fileio.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/fileio.h ./src/dhcp-manager/systemd-dhcp/src/shared/fileio.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/list.h ./src/dhcp-manager/systemd-dhcp/src/shared/list.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/macro.h ./src/dhcp-manager/systemd-dhcp/src/shared/macro.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/refcnt.h ./src/dhcp-manager/systemd-dhcp/src/shared/refcnt.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.c ./src/dhcp-manager/systemd-dhcp/src/shared/siphash24.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/siphash24.h ./src/dhcp-manager/systemd-dhcp/src/shared/siphash24.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/socket-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/socket-util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/sparse-endian.h ./src/dhcp-manager/systemd-dhcp/src/shared/sparse-endian.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/strv.c ./src/dhcp-manager/systemd-dhcp/src/shared/strv.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/strv.h ./src/dhcp-manager/systemd-dhcp/src/shared/strv.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.c ./src/dhcp-manager/systemd-dhcp/src/shared/time-util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/time-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/time-util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.c ./src/dhcp-manager/systemd-dhcp/src/shared/utf8.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/utf8.h ./src/dhcp-manager/systemd-dhcp/src/shared/utf8.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/util.c ./src/dhcp-manager/systemd-dhcp/src/shared/util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/util.h ./src/dhcp-manager/systemd-dhcp/src/shared/util.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/unaligned.h ./src/dhcp-manager/systemd-dhcp/src/shared/unaligned.h
    /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.c ./src/dhcp-manager/systemd-dhcp/src/shared/in-addr-util.c
    /bin/cp "$SYSTEMD_DIR"/src/shared/in-addr-util.h ./src/dhcp-manager/systemd-dhcp/src/shared/in-addr-util.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/_sd-common.h ./src/dhcp-manager/systemd-dhcp/src/systemd/_sd-common.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-client.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-client.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp-lease.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp-lease.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-client.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-dhcp6-lease.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-lease.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-event.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-event.h
    /bin/cp "$SYSTEMD_DIR"/src/systemd/sd-id128.h ./src/dhcp-manager/systemd-dhcp/src/systemd/sd-id128.h
2014-11-19 11:34:52 -05:00
Thomas Haller
0555df65d3 core: minor fix to ensure safe boolean comparison in have_ip6_address()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 17:12:00 +01:00
Thomas Haller
06a45fdcaf firewall: don't set firewall zone for assumed devices
https://bugzilla.redhat.com/show_bug.cgi?id=1098281

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:59:42 +01:00
Thomas Haller
1141727690 firewall: always complete callbacks asynchronously
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:59:42 +01:00
Thomas Haller
90a3332199 firewall: invoke FwAddToZoneFunc callback also when cancelling
Not invoking a callback when cancelling the operation is counter
intuitive.

Note that NMPolicy refs the device, cancelling the call would leave
the reference hanging. That was not an issue because the call was
never cancelled. But still the behavior of NMFirewallManager is
unexpected.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:58:36 +01:00
Thomas Haller
b0b7473af1 firewall: make call handle an opaque pointer type
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:58:36 +01:00
Thomas Haller
b2a3cf4f1d firewall: allow passing NULL callback to nm_firewall_manager_add_or_change_zone()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:58:36 +01:00
Thomas Haller
c5cbe91e60 core: move content of src/firewall-manager directory to src/
The directory firewall-manager/ only contained one source and one
header file. Move them to the parent src/ directory.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-19 12:58:36 +01:00
Dan Winship
fac424b030 core: fix IP4Config.RouteData and IP6Config.RouteData
NMIP4Config/NMIP6Config have their own NMIPRoute->D-Bus conversion
code since the code in libnm-core is gdbus-specific. But they were
doing it wrong, resulting in clients seeing a next hop of 0.0.0.0/::
for all routes.
2014-11-18 08:30:16 -05:00
Dan Williams
3c1187adb9 trivial: remove leftover NM_IFACE_HELPER references
Left over from a previous version of the iface helper patches and was
never removed when NM_IFACE_HELPER was removed.  Since NM_IFACE_HELPER
wasn't defined, this code was already always compiled.
2014-11-17 12:04:11 -06:00
Dan Williams
70f227f552 core: bounce disable_ipv6 when setting userspace IPv6 link-local (bgo #740096)
The kernel does not terminate an ongoing IPv6LL address process when
the IPv6LL address generation mode is set to 'none' (indicating that
userspace wishes to handle IPv6LL).  Next, NetworkManager does not
expose IPv6 addresses internally until they have completed DAD.  This
means that the kernel may still be performing DAD for an IPv6LL
address when NetworkManager turns userspace IPv6LL on, and when
DAD is complete NetworkManager will finally pay attention to the
address.  If the device is in the DISCONNECTED state, NetworkManager
will then generate and assume an IPv6LL-only connection on the device.

Unfortunately, that behavior happens if the following is true:

1) IPv6LL addressing takes a while (eg, dad_transmits is high or
the kernel takes a while for some reason)

2) the activated connection fails quickly (dhclient fails or some
other fatal error terminates the activation attempt)

3) the activated connection has ipv6.method=ignore

In this case, when the device was brought up and ipv6.method=ignore,
NetworkManager re-enabled kernel IPv6LL and reset the IPv6 sysctl
properties.  The kernel then generated an IPv6LL address and began
DAD.  dhclient failed quickly, and NM deactivated the device.  NM
then turned off kernel IPv6LL when deactivating the device, but the
kernel does not terminate the ongoing DAD.  Some time after the device
entered the DISCONNECTED state, the kernel finished DAD and that
allowed NetworkManager to internally see the address, which caused
NetworkManager to emit the 'recheck-assume' signal.  This
generated a new IPv6LL-only connection which was then assumed.

Bouncing 'disable_ipv6' when re-enabling userspace IPv6LL during
device deactivation flushes the tentative kernel IPv6LL address,
thus preventing the address from being announced after userspace
IPv6LL is re-enabled.  The other alternative is to expose
tentative addresses (eg those still doing DAD) in NMPlatform so
they would be flushed when the device deactivates, but that is a
larger & riskier set of changes.

Reproducer:
- ifconfig eth0 down
- prepare a DHCPv4 connection with ipv6.method=ignore
- set /proc/sys/net/ipv6/conf/all/dad_transmits to "15"
- ensure that DHCPv4 will fail (replace dhclient with a script
    that exits after 2 seconds or something)
- run NetworkManager
- activate the DHCP connection and watch it immediately fail
- wait for the kernel to announce the IPv6LL address after DAD finishes
- watch NM "assume" the new IPv6LL connection

https://bugzilla.gnome.org/show_bug.cgi?id=740096
2014-11-17 10:20:37 -06:00
Dan Williams
d1295b12e9 dhcp: wait for an IPv6LL address before starting DHCPv6 (bgo #740147)
For ipv6.method=dhcp NM was not waiting for an IPv6LL address, which
caused the DHCP client to exit early because it had no local address
to bind to.

https://bugzilla.gnome.org/show_bug.cgi?id=740147
2014-11-17 09:52:12 -06:00
Dan Williams
45bfb653f3 wifi: don't query nl80211 for non-WiFi devices (bgo #740131)
The upstream kernel added module aliases for nl80211 in commit
fb4e156886ce6e8309e912d8b370d192330d19d3, so querying nl80211
now auto-loads the module.  Previously NM was doing this to
determine whether an ethernet-like device was a Wi-Fi device
that supported nl80211, but this leads to the nl80211 loading
on platforms that will never have or use Wi-Fi.

Since every nl80211-capable device will already have
DEVTYPE=wlan set (from /sys/class/net/wlan0/uevent), we can use
that as an indicator that the ethernet-like device is WiFi
instead of asking nl80211.

https://bugzilla.gnome.org/show_bug.cgi?id=740131
2014-11-17 09:45:08 -06:00
Dan Winship
543416e5f6 libnm-core: add _nm_utils_is_manager_process
Add a variable indicating whether the process is the NetworkManager
daemon.
2014-11-15 09:48:42 -05:00
Dan Williams
264c0f162c core: fix return type of addrconf6_start()
It returned a boolean and the caller expected a boolean, but the
return type was NMActStageReturn.
2014-11-14 16:15:35 -06:00
Dan Winship
d1faee9228 core: fix a spurious warning with non-kernel network devices
NMDevice was warning about not being able to set ifindex even on
devices that we know don't have an ifindex.

https://bugzilla.gnome.org/show_bug.cgi?id=739889
2014-11-14 15:36:31 -05:00
Lubomir Rintel
3d9d30df58 dhcp: Fix the DHCP client lookup by gtype 2014-11-14 13:54:13 +01:00
Dan Winship
3bfb163a74 all: consistently include config.h
config.h should be included from every .c file, and it should be
included before any other include. Fix that.

(As a side effect of how I did this, this also changes us to
consistently use "config.h" rather than <config.h>. To the extent that
it matters [which is not much], quotes are more correct anyway, since
we're talking about a file in our own build tree, not a system
include.)
2014-11-13 17:18:42 -05:00
Thomas Haller
125f7c4d40 dhcp: log the configured DHCP client
Also move enumerating the installed DHCP plugins to the beginning
of nm_dhcp_manager_init().

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-13 20:10:07 +01:00
Lubomir Rintel
46c869b295 merge: wifi bssid handling fixes
Avoid passing NULL bssid where it does not make sense, fix a couple of bad
asserts.

https://bugzilla.gnome.org/show_bug.cgi?id=739258
2014-11-13 16:42:45 +01:00
Lubomir Rintel
4edab14e73 bluez: Another bluez5 build fix
Fixes the "unused declaration" warning with -Werror and no bluez-libs.

Fixes: f1c9595311
Fixes: 751b52e50b
2014-11-12 17:13:03 +01:00
Lubomir Rintel
751b52e50b bluetooth: Don't call into bluez5 DUN code when it's not enabled
It is conditionally compiled depending on presence of bluez-libs.
Results in undefined symbols:

NetworkManager[19346]: <warn>  (/libnm-device-plugin-bluetooth.so): failed to
    load plugin: /usr/lib64/NetworkManager/libnm-device-plugin-bluetooth.so:
    undefined symbol: nm_bluez5_dun_cleanup
2014-11-12 16:15:20 +01:00
Thomas Haller
66b05c94c0 platform: assert against expected lifetime values of NMPlatformIPAddress
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-12 15:58:47 +01:00
Dan Williams
12f2f09e55 core: remove unused variable 2014-11-11 17:28:50 -06:00
Dan Williams
38b6037f33 vpn: update DefaultRouteManager before sending state change signal
The DRM now affects DNS too, since it determines the "best" IPv4
and IPv6 configs based on it's idea of the default route.  The
Policy is also still updating DNS from a state-change handler for
VPN connections.

This led to a situation where the Policy would remove the VPN's
IP config from the DNS manager in vpn_connection_deactivated() and
call update_ip4_dns(), whereupon get_best_ip4_config()  returned
the just-removed VPN IPv4 config as "best" because the VPN connection
hadn't yet told the DefaultRouteManager to remove it.

Which meant VPN nameservers stuck around in resolv.conf for a long
time after the VPN was disconnected.

Fixes: a39a3ae4cd
2014-11-11 16:14:47 -06:00
Thomas Haller
900763ce0f dhcp: fix adapter for sd logging macros to show file location
Previously we were logging:
   <debug> [1415715440.639086] [__FILE__:__LINE__] client_set_lease_timeouts(): DHCP CLIENT (0xcf221f86): T1 expires in 11h 59min 53.566147s

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-11 22:40:25 +01:00
Thomas Haller
f2097ca482 keyfile: don't assert when parsing invalid prefix
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-11 16:09:08 +01:00