| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
( for F in `cat PATCH_LIST`; do git log --grep "$F" master.. || break; done ) | grep -f PATCH_LIST - | grep cherry | awk '{print $5}' | sed 's/)$//' | while read H; do echo sed "/^$H$/d" -i PATCH_LIST; done
|
|\
| |
| |
| | |
(cherry picked from commit c428935d9f4219f82a0eb1b57792325d287acf78)
|
| |
| |
| |
| |
| |
| |
| | |
Move parent-related stuff before its callers and clean up dispose
so that we no longer need priv->disposed.
(cherry picked from commit 2a7a19e767419093f216b5dbf639d2cf4bc751dd)
|
| |
| |
| |
| |
| |
| |
| | |
Add a netlink implementation for reading InfiniBand properties, but fall back to
sysfs when that isn't supported by the kernel.
(cherry picked from commit 5cf226463a726b9ba9d2e4e950e65c3e71077d02)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to know whether we can create interfaces of any given
NMDevice subclass or not. So don't rely on just the NMPlatformLink
for that information, because we won't have a platform link for
software devices before we create them.
(cherry picked from commit d4e0a1e8cc09b0cdc408501d4521d3ddac617f81)
|
|/
|
|
|
|
|
|
| |
We can't have devices with duplicate interface names so we might
as well use that for dupe checking instead of the (mostly useless)
UDI.
(cherry picked from commit 81db51299719a4cbf3f1f15ead912391d2b52330)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
==21573== Syscall param mount(type) points to unaddressable byte(s)
==21573== at 0x854B9BA: mount (syscall-template.S:81)
==21573== by 0x158922: main (test-common.c:295)
==21573== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21573==
{
<insert_a_suppression_name_here>
Memcheck:Param
mount(type)
fun:mount
fun:main
}
Fixes: d6aef9c188468224d6e1dd670844c3f0e7482c35
(cherry picked from commit 0d7012faab2f69f508a13fdb41fad0a41c7fdc37)
|
|
|
|
|
|
|
|
| |
We'd be able to do so for already existing devices, but not for devices that
are added afterwards, since gudev is hardwired not to listen for events from
kernel.
(cherry picked from commit 26aeb12749c6b81bd0e3b7aee8fe2b639353b102)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with the system
Mount a private sysfs instance. Otherwise gudev sees the devices from the
parent netns as opposed to our netns.
We do, however need a writable /sys/devices subtree for testing the bridge
code. There doesn't seem to be any other way to get a writable subtree of a
read-only filesystem than remounting it with no parameters after the initial
mount. We use this to get a writable sysfs instance and then bindmount it so
that it fits properly in the sysfs hierarchy.
Co-Authored-By: Thomas Haller <thaller@redhat.com>
(cherry picked from commit d6aef9c188468224d6e1dd670844c3f0e7482c35)
|
|
|
|
|
|
|
|
|
| |
When compiling with -fexceptions (as we build our RPM), we must
initialize all variables with a cleanup attribute.
Fixes: 29ccb8851ce09855d227cdc5e58ebc31e25cb4c5
Fixes: f8a9574f7e2a0c0cff839c2d3cd8fe7c9b7f81b9
(cherry picked from commit f55a272aded1fa620c9b41dc05eff7c808d740ab)
|
|\
| |
| |
| | |
(cherry picked from commit 6270db5f0be9ce006bf41e02e72bf34af831c8fc)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of hacky stuff in the Manager, let plugins themselves indicate
which links should be ignored (because they are really child links that
are controlled by a different device that the plugin handles).
(cherry picked from commit 8fa0f4690f6f97b046399e33de1d1d6d81235636)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ethernet, WiFi, and VLAN used the same implementation for initial address.
Ethernet and WiFi used the same implementation (and duplicated code) for
permanent MAC address, plus they both used ethtool in what should be
generic code, which is better done in the platform.
(cherry picked from commit aba250a7d4e72a7a98e6d43b1fb36689671b4855)
|
| |
| |
| |
| | |
(cherry picked from commit ddaea22332907c05222cbec1e1b4365689fbda9f)
|
| |
| |
| |
| | |
(cherry picked from commit fa74ed7ca1bf014b774d1e537e12df80a9c22af4)
|
| |
| |
| |
| |
| |
| |
| | |
If the caller requested that a bond be created, don't return success
if there was an existing bridge with the same name.
(cherry picked from commit 29ccb8851ce09855d227cdc5e58ebc31e25cb4c5)
|
| |
| |
| |
| | |
(cherry picked from commit 2abda4bfa59bfd6de8da69741f2c5f3304e46617)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of having a bunch of logic in the Manager for determining the
VLAN and Infiniband virtual interface names, move the type-specific
logic into the plugins themselves.
(cherry picked from commit 179d56c73c35e83368589b40a8a2d429b41a4dbf)
|
| |
| |
| |
| | |
(cherry picked from commit 42b272b604d8a40d699e1e08beb6135ad1f0caba)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of looping over all plugins and asking each plugin whether it
can handle a link or a connection, have them advertise the link and
connection types they support, and use that when creating new devices.
(cherry picked from commit 71bde20c302ba321688f203a8c5cd1e2d296f0d1)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For existing devices, depending on the order that netlink sends interfaces to
us, the parent may be found after the VLAN interface and not be available when
the VLAN interface is constructed. Instead of failing construction, when a
NMDeviceVlan has no parent keep it unavailable for activation. Then have
the Manager notify existing devices when a new device is found, and let
NMDeviceVlan find the parent later and become available via that mechanism.
This doesn't apply to VLANs created by NM itself, because the kernel requires
a parent ifindex when creating a VLAN device. Thus this fix only applies to
VLANs created outside NetworkManager, or existing when NM starts up.
(cherry picked from commit cd3df12c8f8ed6c868c12bc4e7fe6ba162dafc5b)
|
| |
| |
| |
| | |
(cherry picked from commit 477cbc848af27f0eccf59092873d75e5a50552c1)
|
| |
| |
| |
| |
| |
| |
| | |
Instead of strcmp()-ing the device name, recognize these devices from their
driver's DEVTYPE.
(cherry picked from commit baee9080b790830183fa74fd83f5bf9757f4ac78)
|
| |
| |
| |
| |
| |
| |
| |
| | |
beb18050 made this code run for all devices instead of just ethernet
devices, which means any kind of connection gets compared to any
device. But only compatible connections should be considered.
(cherry picked from commit 77d01c909470058695c16ae0e22ccfd6e604df34)
|
|/
|
|
|
|
|
|
| |
If the queued activation request failed before the device is
finished deactiving the old request, don't start activating
the failed queued request.
(cherry picked from commit fb1d04099f445eda974cbf0dfb334b3718031cc7)
|
|
|
|
|
|
| |
Fixes: 1ad193a01759f1dd8cbb16317b9b3490fa95193a
Fixes: 994136e14216bcbf722e95872b8da1490d8f47ff
(cherry picked from commit e1654639641eabaa0d3ed7b498f52efad5226add)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The link test was disabled in commit 67ad3fcb5b65fd74cab7f16531fce7ab457d8c43.
The previous issues are not fixed, but apparently disabling the test doesn't
help to get it fixed.
Re-enable it and if it fails we have a better reason to fix it.
Or maybe it works now (?). Didn't fail for me...
(cherry picked from commit f614ebe6f54d9346f15ebee82fe2673e8de94cf4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
netlink object
Throwing away the udev_device instance is wrong. There are two cases:
- the udev-device appears, and the netlink object will never appear
(or is already gone). In this case, keeping the udev-device is ok
because we will eventually get a signal from UDev to cleanup the
device instance.
- the udev-device appears before the netlink object. In this case we
want to keep the udev instance to have it ready.
Fixes: 388b7830f322b60960884328ff51f7b4df0ef3d3
(cherry picked from commit 7572837375d6eed2833eb5144fc8f9221c57eedf)
|
|
|
|
| |
(cherry picked from commit 575d8186e424bba36576b234f773a69613ba4c1e)
|
|\
| |
| |
| |
| |
| | |
#747628) (bgo #743209)
(cherry picked from commit 4f05261af8cabf560857e320c625fee80a816ad9)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Always intern string from udev_get_driver().
We use the result of udev_get_driver() for setting NMPlatformLink.driver.
In all other cases, we already set that value to an interned string,
which simplifies memory handling.
As it was, the lifetime of that string was tied to the lifetime of the
GUdevDevice.
This is not a stelar solution, but we assume that the overall numbers
of different drivers is limited so we don't leak large amounts of
memory.
(cherry picked from commit 3171b543dc30090fc50d0c74786e76062e079ed2)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
link_extract_type() would return the NMLinkType and a
@type_name string. If the type was unknown, this string
was rtnl_link_get_type() (IFLA_INFO_KIND).
Split up this behavior and treat those values independently.
link_extract_type() now only detects the NMLinkType. Most users
don't care about unknown types and can just use nm_link_type_to_string()
to get a string represenation.
Only nm_platform_link_get_type_name() (and NMDeviceGeneric:type_description)
cared about a more descriptive type. For that, modify link_get_type_name()
to return nm_link_type_to_string() if NMLinkType could be detected.
As fallback, return rtnl_link_get_type().
Also, rename the field NMPlatformLink:link_type to "kind". For now this
field is mostly unused. It will be used later when refactoring platform
caching.
(cherry picked from commit e2c742c77b7c708d6a5e6f689ff7cc91b23ab445)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Given the name nm_link_type_to_string(), we would not expect
to find it in nm-linux-platform.c. It either should be named
nm_platform_link_type_to_string() and be put in a new
nm-platform-utils.c file, or it should be named
nm_utils_link_type_to_string() and be put in NetworkManagerUtils.h.
For now, just leave it here.
(cherry picked from commit b538adf12393f67d60f7f5ec74b2a3c1b968f35b)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
platform cache
link_extract_type() would call tun_get_properties() to determine whether
the link if a TAP or TUN device. The previous implementation would
receive the ifindex, and resolve the ifname via lookup in the platform
cache.
This means, the call on link_extract_type() will only succeed to detect
the TUN/TAP properties, if the libnl object is already in the cache.
Currently that is always the case and there is no problem.
It is desireable, that we can resolve the link type of an object without
consulting the platform cache first.
(cherry picked from commit 18d611d5d2a613204e7123fda3d3f75271722df6)
|
| |
| |
| |
| |
| |
| |
| |
| | |
ASSERT_VALID_PATH_COMPONENT() always returns the input argument --
unless it fails an assertion and terminates the program. No need
to require the user to use the return value.
(cherry picked from commit 63bb33b5346b431d92e413b8bc6bafc50c8ff9b7)
|
| |
| |
| |
| |
| |
| | |
Otherwise any user with network control privileges can spam the logs.
(cherry picked from commit 8a5910c25cd0102d36a9adbb7a2c831e4fa5e046)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
See "Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute""
http://www.spinics.net/lists/linux-wireless/msg132219.html
The reverted kernel patch caused rtnl_link_get_type() to return "wlan"
for WiFi devices. Since NM depends on this function returning
NULL for WiFi devices so that it goes on to check the sysfs DEVTYPE
attribute, the kernel patch caused WiFi devices to show up as Generic
ones instead. That's wrong, and NM should be able to more easily
handle changes in the kernel drivers from NULL to a more descriptive
rtnl_link_get_type() return, since that's the kernel trend.
What NM should be doing here is to fall back to other detection
schemes if the type is NULL or unrecognized. Make that happen and
clean things up to use a table instead of a giant if(strcmp()) block.
https://bugzilla.gnome.org/show_bug.cgi?id=743209
(cherry picked from commit 2d527b30ffb57e458f8880e8cf4f5801d648ffeb)
|
| |
| |
| |
| | |
(cherry picked from commit b484b03acf66f99ef59cc688de291f07f1cc5603)
|
| |
| |
| |
| |
| |
| |
| |
| | |
Co-Authored-By: Lubomir Rintel <lkundrak@v3.sk>
Fixes: 388b7830f322b60960884328ff51f7b4df0ef3d3
Fixes: 285ee1fda2052e5b59110a323082c9423bf882e0
(cherry picked from commit b22bf15c1d4aca4aada52debbe5f4641f5db24a4)
|
| |
| |
| |
| | |
(cherry picked from commit 388b7830f322b60960884328ff51f7b4df0ef3d3)
|
| |
| |
| |
| |
| |
| | |
And use it everywhere.
(cherry picked from commit 3006df940ca254ed999e527a6e797fd016e7ebc9)
|
|/
|
|
|
|
|
| |
This allows us to always announce links when the kernel advertises
them, instead of waiting for udev.
(cherry picked from commit 2599dadc2859262de784567384ba72ab92204d55)
|
|
|
|
|
|
|
|
| |
With NM_MORE_LOGGING disabled, we still want the compiler to evaluate
the argument list. By wrapping it in "if(FALSE)", we get compile time
checks, but the logging statement will be optimized out.
(cherry picked from commit cb6bafb9af721fcd2295b4da73f4a7812eb4f3e8)
|
|
|
|
| |
(cherry picked from commit 245720819e704b50e97d8b7dfb7c6f206f10df68)
|
|\
| |
| |
| |
| |
| | |
https://bugzilla.gnome.org/show_bug.cgi?id=748131
(cherry picked from commit 2316d233e36d7c98e4ecad2016ed2467c853a6a0)
|
| |
| |
| |
| | |
(cherry picked from commit ea5865cf456b407e0e9627868e2af7154a574ad1)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move detection of @support_user_ipv6ll to a separate function
_support_user_ipv6ll_detect() and call it immediately after the
places where we receive libnl objects from kernel, i.e.
get_kernel_object(), event_notification(), and cache_repopulate_all().
Also, whether we have support depends on the kernel and is per-system,
not per-platform-instance. Make @_support_user_ipv6ll a global variable.
This way, we don't need to pass around a NMLinuxPlatform instance.
(cherry picked from commit f15a27f9c1635808268f9aa1d7a3b9da95438259)
|
| |
| |
| |
| | |
(cherry picked from commit a319aea9f42db7fd88981704473726588382810f)
|
| |
| |
| |
| | |
(cherry picked from commit 0c03db4e8e9f717edb3d1d2be45ba71ca277024b)
|
| |
| |
| |
| | |
(cherry picked from commit 7db9306aa3a6e4a9ed028bae326246a83be0fd0b)
|