We want to call nm_connection_get_uuid() also on connections that don't verify.
Otherwise it is chumbersome to check first for verified connection.
(cherry picked from commit 61eed191a9)
Don't clear NMDevice @master in nm_device_cleanup() if the device link
is still enslaved because this causes an inconsistent state in which
the slave in included in the @slaves field of master device but
@master of slave device is NULL.
In such state, if the master link gets deleted, NM receives a change
event for each slave and a deletion event for the master; the change
events should also remove slaves from @slaves of master device, but
since their @master field is NULL the removal can't be performed.
Later, when the master deletion event is received, @slaves is not empty
in dispose() of NMDevice and the following assertion is triggered:
dispose: runtime check failed: (priv->slaves == NULL)
https://bugzilla.redhat.com/show_bug.cgi?id=1243371
(cherry picked from commit b557f91a1b)
ethtool may cause the auto-loading of a kernel module for non-existing
interface-names. Avoid that by checking whether such an interface exists.
(cherry picked from commit 9366bd7f90)
This reverts commit 44fee0f6ff.
Bad quoting here. Also, this is not quite the best fix for the issue,
filtering on ACTION=="add" is probably a bit more elegant.
(cherry picked from commit b0f3250dfb)
This downgrades the following warning down to debug-level.
<warn> Could not get scan request result: GDBus.Error:fi.w1.wpa_supplicant1.Interface.ScanError: Scan request rejected
It seems this ~error~ happens regularly, so warning about it is overly
alarming.
(cherry picked from commit ebc387638a)
Python is just too slow on some machines. Needed around twice the previous
limit on BCM2835 with Pidora 20, let's add some safety margin too.
(cherry picked from commit 81cc4d27b1)
Add 'ssids' option to RequestScan() DBus call allowing scanning multiple SSIDs,
support that in libnm and nmcli. And fix nmcli for connecting to hidden SSIDs.
https://bugzilla.gnome.org/show_bug.cgi?id=752173
'ssid' can repeat when more SSIDs should be scanned, e.g.
$ nmcli dev wifi rescan ssid "hidden cafe" ssid AP12 ssid "my home Wi-Fi"
Bash completion fixed by thaller@redhat.com
(cherry picked from commit e247567d87)
NMManager was failing to initialize if there was only a private bus,
despite the fact that this is exactly the use case that the private
bus was added for.
The only other potentially-failing code in nm_manager_new() was adding
prop_filter to the D-Bus connection, but this can't really fail, so
just assert that it doesn't. And now, nm_manager_new() always
succeeds, so update the caller for that.
(cherry picked from commit 1c11c5cff1)
The config-tests contain a NMTestDevice which derives from NMDevice.
However, for testing, it just skips the constructor and destructor of
NMDevice. This caused also the destructors of NMExportedObject to be skipped
and thus valgrind complained about leaked memory.
Fixes: 6fcc1deee0
[thaller@redhat.com: although this branch doesn't have NMExportedObject,
the patch is still more correct, and thus backport it too]
(cherry picked from commit 3ae6f9d793)
All current users of NM_IN_SET() would rather use short-circuit evalation
(or don't care). It seems that doing it by default seems favorable.
The only downside is, that this might have somewhat unexpected behavior
to a user who expects a regular function (which would evaluate always
all arguments).
Fixes: 7860ef959a
(cherry picked from commit 96cacc07e8)
Let the preprocessor do more work, but generate a simple expression that
the compiler can optimize (presumably) better.
(cherry picked from commit 7860ef959a)
Calling ethtool on a non-existing interface name, might cause
the loading of a kernel module. Avoid that, by checking first
whether such an interface exists.
https://bugzilla.redhat.com/show_bug.cgi?id=1247156
(cherry picked from commit f0ada4b534)
ethtool may cause the auto-loading of a kernel module for non-existing
interface-names. Avoid that by checking whether such an interface exists.
This is inherently racy.
(cherry picked from commit 44fee0f6ff)
Performing an ioctl on a non existent device may cause the automatic
load of a kernel module if the device name matches a module
alias. Check if the device actually exists before calling the ioctl.
(cherry picked from commit ab41c13b06)
Add an assert (g_return_val_if_reached()) that the interface name is
valid and shorter then 16 bytes. If it happened to be longer, strncpy()
would not have zero terminated the interface name.
(cherry picked from commit 5b123f2539)
For delete-events, we only need a shallow object with the key fields
set. That sufficies to lookup in the cache and find the object to
delete.
One other issue is that _nmp_vt_cmd_plobj_init_from_nl_link() and
link_extract_type() might call to ethtool for the already deleted
instance. Just avoid that.
https://bugzilla.redhat.com/show_bug.cgi?id=1247156
(cherry picked from commit a4c7176fe9)
warning: function declaration isn’t a prototype [-Wstrict-prototypes]
In C function() and function(void) are two different prototypes (as opposed to
C++).
function() accepts an arbitrary number of arguments
function(void) accepts zero arguments
(cherry picked from commit 94a393e9ed)
Move the check for a platform link before devtimeout_from_file(). The
check in the platform cache should be more performant and yield success
in most cases.
This can save reading and parsing the ifcfg-rh file.
(cherry picked from commit 6608331aec)