Commit graph

12405 commits

Author SHA1 Message Date
Thomas Haller
ce7687e499 config/test: add a test for nm_config_reload() with different signals
(cherry picked from commit e6c64af8be)
2015-09-09 12:06:59 +02:00
Beniamino Galvani
2b9db2bf1b device: retry DHCP after timeout/expiration for assumed connections
If DHCP fails for an assumed connection, NetworkManager would
transition the device to the FAILED and then to the ACTIVATED state
(because it is assumed); hence if the DHCP server goes temporarily
down the device will go into a permanent state without IP
configuration.

Fix this and try DHCP again after some time when the connection
is an assumed one.

https://bugzilla.redhat.com/show_bug.cgi?id=1246496
2015-09-08 13:27:48 +02:00
Lubomir Rintel
317b6cb880 tests: fix 32-bit build
Fixes: 874f455d6d
(cherry picked from commit f71f9d5fcf)
2015-09-08 13:13:37 +02:00
Lubomir Rintel
12af09b779 test: fix duplicate test names
New glib complains.

(cherry picked from commit 874f455d6d)
2015-09-08 13:13:36 +02:00
Lubomir Rintel
e10a8f1f37 device: don't reset NM_UNMANAGED_DEFAULT when platform doesn't override this
This would cause the ip_vti0 generic device (that appears upon insertion of
ip_vti module during libreswan ipsec stack init) to go managed and brought UP.
Without addresses assigned the device would cause all the VPN traffic to
disappear in the oblivion.

(cherry picked from commit 1c46ddf196)
2015-09-08 12:33:29 +02:00
Lubomir Rintel
15e4ee69df vpn-connection: fix unsetting the gateway
Addresses the clash between the two commits which would cause the parent device
gateway to be overwritten with 0.0.0.0 upon route-based VPN activation:

Fixes: 063677101a
Fixes: 1465c1d326
(cherry picked from commit da2ae8ce4e)
2015-09-08 12:33:28 +02:00
Thomas Haller
f768f09a86 core/test: extend timeout for kill-process utils test
On slow virtual machine, these tests could fail because the
timeout was too low. As in a successful run the timeouts should
not be reached anyway, just extend them.

(cherry picked from commit bf6187e030)
2015-09-04 20:55:04 +02:00
Thomas Haller
765ba17ab5 config: fix wrong signature of class-method config_changed() for signal
Actually, just drop it. It's unused anyway.

(cherry picked from commit 39de56844e)
2015-09-04 16:36:54 +02:00
Beniamino Galvani
5ec73e70bb cli: describe usage of the 'connection.metered' property
(cherry picked from commit 04e29df47d)
2015-09-04 11:00:10 +02:00
Jiří Klimeš
7f0269673a device: give the default wired profiles the lowest autoconnect-priority
Later when other connections are created, they will be preferred over the
default one.

https://bugzilla.redhat.com/show_bug.cgi?id=1075148#c15

(cherry picked from commit 54019a403a)
2015-09-04 10:01:33 +02:00
Jiří Klimeš
7cfd6fc641 libnm-core: fix a crash in priority_strv_to_maplist()
strv can be NULL.

Reproducer:
$ nmcli con mod my-vlan vlan.ingress 1:5

(cherry picked from commit 71c8c2e587)
2015-09-01 16:13:01 +02:00
Michael Biebl
7ac3b75f42 Split out the bits which determine ID_NET_DRIVER or DRIVERS into separate udev rules file
Those are not required with systemd-udevd v210 or newer. This way
distros which have a new enough version of udev can skip installing
84-nm-drivers.rules. While at it, don't use absolute paths for sed and
ethtool.

(cherry picked from commit 8b67de901a0ae1390479d32ed52ace719ebb3734)
2015-08-31 22:40:24 +02:00
Jiří Klimeš
c908cf90fd introspection: add AUDIT domain to available list in SetLogging() description
Fixes: 41e7051165

(cherry picked from commit 988fa1ba8c)
2015-08-31 09:08:55 +02:00
Jiří Klimeš
71104eefdc doc: fix the names of [in|e]gress-priority-map properties in ifcfg-rh man page
(cherry picked from commit 5e3582c6b1)
2015-08-31 09:08:32 +02:00
Ulrich Ölmann
8a22a98157 config: bugfix: parse commandline options into correct object
Config related commandline options should be parsed into a function argument but
were instead parsed into an object with local scope. As a result none of them
had any impact.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>

Fixes: b4ad7434a8

https://mail.gnome.org/archives/networkmanager-list/2015-August/msg00033.html
2015-08-28 08:24:02 +02:00
Thomas Haller
26e6b2c189 platform: assert to successfully dlopen libnl3
(cherry picked from commit a922d5e587)
2015-08-27 20:29:11 +02:00
Lubomir Rintel
0ae203bf9d release: bump version to 1.0.7 (development) 2015-08-27 19:25:11 +02:00
Lubomir Rintel
59deb78f85 release: update NEWS 2015-08-27 18:21:26 +02:00
Lubomir Rintel
8ce6c3c0ce release: bump version to 1.0.6 2015-08-27 18:21:26 +02:00
Lubomir Rintel
d3a91d1ca0 platform: remove bogus asserts
You can't really compare a symbol resolved by ld.so to dlsym()'d one. The
former one is likely just an address of trampoline in PLT.
2015-08-27 18:21:26 +02:00
Lubomir Rintel
c872c6656c dbus: allow talking to more plugins in DBus policy
These two has been seen in the wild.
Libreswan is the RHEL's openswan fork.

(cherry picked from commit 82031add33)
2015-08-27 15:12:50 +02:00
Jiří Klimeš
0dee0d415f merge: allow overriding MTU for team devices (rh #1255927)
https://bugzilla.redhat.com/show_bug.cgi?id=1255927

(cherry picked from commit 4207671ecd)
2015-08-27 10:36:22 +02:00
Jiří Klimeš
33ee3b2a49 ifcfg-rh: save wired properties also for bond/team (rh #1255927)
Without that MTU is not saved to ifcfg file for bond and team and thus it is
lost over NetworkManager restart.

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

(cherry picked from commit feb5b5538a)
2015-08-27 10:34:28 +02:00
Jiří Klimeš
65783f7a92 team: allow overriding the MTU for team device (rh #1255927)
Set the MTU if 802-3-ethernet.mtu is present and non-zero. The ifcfg-rh writer
sets it if there's a MTU key.

The same change as for bond in commit a169a79a7d.

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

(cherry picked from commit 7d3a4178a5)
2015-08-27 10:33:47 +02:00
Beniamino Galvani
78fc92abe8 device: accept multiple addresses in a DHCPv6 lease
When the DHCPv6 lease received from the server contains multiple
addresses, dhclient generates a new BOUND event for each of
them. Instead of overwriting the previous IP6 configuration for each
BOUND event, we should try to detect if the new configuration belongs
to the same lease and merge its addresses with the existing one in
such case.

This allows NetworkManager to configure multiple addresses on an
interface via DHCPv6.

https://bugzilla.gnome.org/show_bug.cgi?id=681764
https://bugzilla.redhat.com/show_bug.cgi?id=1244293
(cherry picked from commit 1d6e8e8da7)
2015-08-26 15:18:34 +02:00
Beniamino Galvani
eb1ccf90b8 device: fix clearing of dhcp6_restart_id in dhcp6_cleanup()
Fixes: abc96ecdfd
(cherry picked from commit 905220b337)
2015-08-26 11:51:19 +02:00
Beniamino Galvani
80b3081d6a device: don't disconnect after DHCP failure when there are static IPs
Don't disconnect the device when the DHCP renewal fails and there are
already configured static IP addresses on the device. Instead, keep
the device up and try DHCP again after some time.

https://bugzilla.redhat.com/show_bug.cgi?id=1168388
(cherry picked from commit abc96ecdfd)
2015-08-26 10:54:33 +02:00
Jiří Klimeš
98a560258a core: don't set "startup complete" until devices have been added (rh #1256772)
check_if_startup_complete() could be invoked from nm_settings_start() before
devices had chance to be added, which results in premature "startup complete"
and NM would quit when configure-and-quit=yes is set up.
Postpone actual check_if_startup_complete() resolution until we add all devices
and they are processed.

 (gdb) bt
 #0  0x00005555556401f3 in check_if_startup_complete (self=0x5555559f91d0)
     at nm-manager.c:719
 #1  0x00007ffff4d69de8 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
 #2  0x00007ffff4d7b70d in signal_emit_unlocked_R ()
     at /lib64/libgobject-2.0.so.0
 #3  0x00007ffff4d83471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
 #4  0x00007ffff4d8372f in g_signal_emit () at /lib64/libgobject-2.0.so.0
 #5  0x00007ffff4d6e4b5 in g_object_dispatch_properties_changed ()
     at /lib64/libgobject-2.0.so.0
 #6  0x00007ffff4d709d9 in g_object_notify () at /lib64/libgobject-2.0.so.0
 #7  0x00005555556e232c in check_startup_complete (self=self@entry=0x555555a0e130) at settings/nm-settings.c:204
 #8  0x00005555556e5203 in nm_settings_start (self=0x555555a0e130, error=error@entry=0x7fffffffe658) at settings/nm-settings.c:2122
 #9  0x0000555555646d06 in nm_manager_start (self=0x5555559f91d0, error=0x7fffffffe658) at nm-manager.c:4153
 #10 0x00005555555add43 in main (argc=1, argv=0x7fffffffe7c8) at main.c:428
 (gdb)

Fixes:Beaker:NetworkManager_Test37_run_once_new_connection

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

(cherry picked from commit 7edb53f660)
2015-08-26 09:55:03 +02:00
Thomas Haller
e16ebfb4a6 platform: merge branch 'th/platform-parent-other-netns-bgo753726'
Add support for IFLA_LINK_NETNSID to properly handle linked parent
interfaces that reside in another netns.

This requires support of the IFLA_LINK_NETNSID from both the kernel
and libnl3.

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

(cherry picked from commit 01580195fa)
2015-08-25 23:08:41 +02:00
Thomas Haller
9302639cfe platform: handle parent interfaces in other netns
The parent of a link (IFLA_LINK) can be in another network namespace and
thus invisible to NM.

This requires the netlink attribute IFLA_LINK_NETNSID which is supported
by recent versions of kernel and libnl.

In this case, set the parent field to NM_PLATFORM_LINK_OTHER_NETNS
and properly handle this special case.

(cherry picked from commit 790a0713d2)
2015-08-25 23:07:59 +02:00
Thomas Haller
424ff90497 platform: minor refactoring in _nl_get_vtable()
(cherry picked from commit 31902f8f6b)
2015-08-25 23:07:59 +02:00
Thomas Haller
c2c192cd45 platform: minor fix in nm_platform_link_to_string()
This had not real consequences, because @master and @parent are of
the same size.

(cherry picked from commit 677d802be6)
2015-08-25 23:07:59 +02:00
Thomas Haller
6370f7b926 platform: return const argument from _nl_get_vtable()
(cherry picked from commit 2189c7c75b)
2015-08-25 23:07:59 +02:00
Thomas Haller
4da484f26c platform: assert we loaded the right libnl library
(cherry picked from commit 19ebe51e2e)
2015-08-25 23:07:59 +02:00
Lubomir Rintel
a59725d2ad platform: parent link can be in a different NETNS
(cherry picked from commit ced33345d3)
2015-08-25 23:07:59 +02:00
Thomas Haller
14a726e9e6 libnm-core: fix return value in nm_utils_enum_to_str()
Fixes: 8be9814793
(cherry picked from commit a67c1ec4b5)
2015-08-24 16:39:37 +02:00
Jiří Klimeš
25c9d92ec4 libnm-util: fix flags for GObject introspection (rh #1255436)
Without marking the enumeration as flags, the types will be "enumeration"
instead of "bitfield". And python raises ValueError exception.

Example:
from gi.repository import NMClient, NetworkManager
client = NMClient.Client.new()
for dev in client.get_devices():
    if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
        for ap in dev.get_access_points():
            ap.get_rsn_flags()

raises "ValueError: invalid enum value: 648"

https://bugzilla.redhat.com/show_bug.cgi?id=1255436
(cherry picked from commit 75b3107b09)
2015-08-24 12:41:34 +02:00
Beniamino Galvani
f75abea530 merge: ethernet: add Wake-on-LAN support
Add support for configuring Wake-on-LAN options for Ethernet
connections.

https://bugzilla.redhat.com/show_bug.cgi?id=1141417
2015-08-21 18:15:47 +02:00
Beniamino Galvani
ac9d087278 libnm-core: trivial: fix glib-mkenums parse warning
Avoid a new line in the definition of enum value to fix the following
glib-mkenums warning:

  glib-mkenums: nm-setting-wired.h:71:
  Failed to parse ` - 1 - NM_SETTING_WIRED_WAKE_ON_LAN_DEFAULT) '

Fixes: 5622461c04
(cherry picked from commit f8ae5f1671)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
4181f3c4f5 ifcfg-rh: properly write the wake-on-lan property
ETHTOOL_OPTS must be cleared when the wake-on-lan value is 'default'
and a "wol d" string must be appended when the value is 'none'.

Fixes: 2e0d0bc050
(cherry picked from commit cf455aa0e2)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
2757891b57 libnm-core: strip nm_utils_enum_from_str() input string
(cherry picked from commit e65854f609)
2015-08-21 18:12:36 +02:00
Thomas Haller
ea7063dbc2 libnm: fix gtkdoc for nm_utils_enum_to_str() and nm_utils_enum_from_str()
Fixes: 8be9814793
(cherry picked from commit 97ec44f593)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
26d6d5c1da core: configure Wake-on-LAN parameters for Ethernet devices
(cherry picked from commit 996cbcd25c)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
f7811e87b8 cli: add support for Wake-on-LAN settings
(cherry picked from commit de92df6c9f)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
fc91d538f5 ifcfg-rh: add support for Wake-on-LAN ethtool options
Based on branch danw/wip/ethtool by Dan Winship <danw@redhat.com>

(cherry picked from commit 2e0d0bc050)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
d449d82304 libnm-core: add Wake-on-LAN properties to NMSettingWired
(cherry picked from commit 5622461c04)
2015-08-21 18:12:36 +02:00
Beniamino Galvani
f4ce6760e0 libnm-core: add enum conversion utilities
Add functions nm_utils_enum_to_str() and nm_utils_enum_from_str()
which can be used to perform conversions between enum values and
strings, passing the GType automatically generated for every enum by
glib-mkenums.

(cherry picked from commit 8be9814793)
2015-08-21 18:12:36 +02:00
Jiří Klimeš
3b3f5fa755 libnm: fix the callback in g_simple_async_result_new()
(cherry picked from commit 79db8e83e1)
2015-08-21 13:43:05 +02:00
Jiří Klimeš
7b47b5e740 merge: Wi-Fi band/channel locking fixes (bgo #627571)
- fixes value for 'freq_list' wpa_supplicant option
 - allows locking to a channel within a band
 - adds utility functions for getting Wi-Fi frequencies

https://bugzilla.gnome.org/show_bug.cgi?id=627571
2015-08-21 10:00:45 +02:00
Jiří Klimeš
d80f1fee87 wifi: also support locking connections to a channel within band (bgo #627571)
https://bugzilla.gnome.org/show_bug.cgi?id=627571
(cherry picked from commit c0f6725146)
2015-08-21 09:50:55 +02:00