- 10 Jun, 2021 20 commits
-
-
Thomas Haller authored
With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, the generated code emits a compiler warning: libnm-core/tests/nm-core-tests-enum-types.c:17:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] if (g_once_init_enter (&g_define_type_id__volatile)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ libnm-core/tests/nm-core-tests-enum-types.c:40:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] if (g_once_init_enter (&g_define_type_id__volatile)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ libnm-core/tests/nm-core-tests-enum-types.c:63:7: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] if (g_once_init_enter (&g_define_type_id__volatile)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ We could pass "-Wincompatible-pointer-types-discards-qualifiers" as CFLAGS when building this file. However, we have a workaround in our "nm-glib-aux/nm-glib.h", so we can instead include "nm-default.h". At first glance, that might look like the less preferable solution. However, this file is only there for unit tests, and we also include "nm-default.h" for other sources that are generated with "glib-mkenums". So, doing it also for our tests becomes the preferable solution. (cherry picked from commit 755d97d3) (cherry picked from commit 294efba1) (cherry picked from commit 2cff3f36) (cherry picked from commit cb1a632c) (cherry picked from commit df4008e9)
-
Thomas Haller authored
When including <glib.h>, it will always define G_LOG_DOMAIN if it is not yet defined. Usually we want to include "nm-default.h" as very first header. In that case, <glib.h> is not yet included. Then the previous check #error works well. However, if we include "nm-default.h" in sources generated by glib-mkenums, then the generator first already includes <glib.h>, and thus defines G_LOG_DOMAIN. It does so for "libnm-core/nm-core-enum-types.c" and "libnm/nm-enum-types.c", where the #error would not trigger. But we will also include "nm-default.h" for "libnm-core/tests/nm-core-tests-enum-types.c". That will start triggering this #error. While in general we want to include "nm-default.h" first, we also need to support cases where <glib.h> gets included first. Thus this error is not useful. Remove it. (cherry picked from commit 42fa8f3d) (cherry picked from commit a1f3cebb) (cherry picked from commit 61d78ed3) (cherry picked from commit 33113c71) (cherry picked from commit cefe7456)
-
Thomas Haller authored
It's not strictly necessary, because contrary to g_atomic_pointer_get() and g_atomic_pointer_compare_and_exchange(), glib's variant for the setter is mostly fine. Still, reimplement it, because we use typeof() eagerly and can thus add more static checks than glib. (cherry picked from commit 7c60e984) (cherry picked from commit 6ded463f) (cherry picked from commit 976b358b) (cherry picked from commit 296a770a) (cherry picked from commit 32c81a29)
-
Thomas Haller authored
With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, we get a failure for g_atomic_pointer_get(): ../shared/nm-glib-aux/nm-hash-utils.c:38:9: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] g = g_atomic_pointer_get(&global_seed); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ ../shared/nm-glib-aux/nm-hash-utils.c:109:32: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] return ((*((const guint *) _get_hash_key())) ^ static_seed) ?: 3679500967u; ^~~~~~~~~~~~~~~ ../shared/nm-glib-aux/nm-hash-utils.c:84:14: note: expanded from macro '_get_hash_key' _g = g_atomic_pointer_get(&global_seed); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ ../shared/nm-glib-aux/nm-hash-utils.c:123:9: error: passing 'typeof (*(&global_seed)) *' (aka 'const unsigned char *volatile *') to parameter of type 'const guint8 **' (aka 'const unsigned char **') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] g = _get_hash_key(); ^~~~~~~~~~~~~~~ ../shared/nm-glib-aux/nm-hash-utils.c:84:14: note: expanded from macro '_get_hash_key' _g = g_atomic_pointer_get(&global_seed); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ (cherry picked from commit 5e57ea37) (cherry picked from commit 1e4cfba6) (cherry picked from commit 446cac18) (cherry picked from commit af4d01b5) (cherry picked from commit 17c83d09)
-
Thomas Haller authored
Disable "-Wincompatible-pointer-types-discards-qualifiers" warning, as this breaks build of the gdbus-codegen files. With glib2-2.67.0-1.fc34.x86_64.rpm, clang-11.0.0-2.fc34.x86_64.rpm, we get a failure to build generated code: introspection/org.freedesktop.NetworkManager.AccessPoint.c:438:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] G_DEFINE_INTERFACE (NMDBusAccessPoint, nmdbus_access_point, G_TYPE_OBJECT) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:1784:47: note: expanded from macro 'G_DEFINE_INTERFACE' #define G_DEFINE_INTERFACE(TN, t_n, T_P) G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:1803:61: note: expanded from macro 'G_DEFINE_INTERFACE_WITH_CODE' #define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END() ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:2042:7: note: expanded from macro '_G_DEFINE_INTERFACE_EXTENDED_BEGIN' if (g_once_init_enter (&g_define_type_id__volatile)) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ introspection/org.freedesktop.NetworkManager.AccessPoint.c:944:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] G_DEFINE_TYPE_WITH_CODE (NMDBusAccessPointProxy, nmdbus_access_point_proxy, G_TYPE_DBUS_PROXY, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:1615:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE' #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:2032:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN' _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:2000:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER' if (g_once_init_enter (&g_define_type_id__volatile)) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ introspection/org.freedesktop.NetworkManager.AccessPoint.c:1729:1: error: passing 'typeof (*(&g_define_type_id__volatile)) *' (aka 'volatile unsigned long *') to parameter of type 'gsize *' (aka 'unsigned long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] G_DEFINE_TYPE_WITH_CODE (NMDBusAccessPointSkeleton, nmdbus_access_point_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:1615:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE' #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:2032:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN' _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:2000:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER' if (g_once_init_enter (&g_define_type_id__volatile)) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' (!g_atomic_pointer_get (location) && \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ ^~~~~~~~~~~~~~~~~ (cherry picked from commit 03d9ec27) (cherry picked from commit 595c5854) (cherry picked from commit 3a31fc45) (cherry picked from commit cb28b6a0) (cherry picked from commit 983f87c5)
-
Thomas Haller authored
The dispatcher code does not use the generated introspection sources (anymore). Don't add a dependency. (cherry picked from commit e0a3a5e2) (cherry picked from commit 6ba600cb) (cherry picked from commit b8a172a6) (cherry picked from commit 2d6690ec) (cherry picked from commit 9b0ee443)
-
Thomas Haller authored
It seems it can happen that the service is not yet unregistered from the D-Bus broker, even if we already reaped the PID. /builds/NetworkManager/NetworkManager/tools/run-nm-test.sh --called-from-make /builds/NetworkManager/NetworkManager/build --launch-dbus=auto /builds/NetworkManager/NetworkManager/build/libnm/tests/test-nm-client --- stdout --- /libnm/device-added: nmtst: initialize nmtst_get_rand() with NMTST_SEED_RAND=0 --- stderr --- ** test:ERROR:../shared/nm-test-utils-impl.c:216:nmtstc_service_cleanup: assertion failed: (!name_exists(info->bus, "org.freedesktop.NetworkManager")) Workaround by waiting a bit. We now iterate the main GMainContext, unlike before. But that should not cause any problems for the test. (cherry picked from commit 1b8ccacc) (cherry picked from commit d10d14d7) (cherry picked from commit d34e6193) (cherry picked from commit b4302981) (cherry picked from commit 2009025c)
-
Thomas Haller authored
nmtst_main_context_iterate_until() is a macro, and we don't want to restrict the valid integer type (or range) of the "timeout_msec" argument. In particular, if the user calculates a timeout with "timestamp_msec - now_msec", the resulting "timeout_msec" might be a negative gint64. We should handle that gracefully, and not let it be cast to a huge unsigned int. (cherry picked from commit 6cb68884) (cherry picked from commit 4d572bea) (cherry picked from commit 95b74a3b) (cherry picked from commit 500c63db) (cherry picked from commit e8a5cee1)
-
Thomas Haller authored
Like nmtst_main_context_iterate_until_assert(), but allows to run into timeout. (cherry picked from commit f2baa10b) (cherry picked from commit 3e41eb83)
-
Thomas Haller authored
shared/tests/trivial: rename nmtst_main_context_iterate_until() to nmtst_main_context_iterate_until_assert() nmtst_main_context_iterate_until*() iterates until the condition is satisfied. If that doesn't happen within timeout, it fails an assertion. Rename the function to make that clearer. (cherry picked from commit 90bb46c8) (cherry picked from commit 68800feb)
-
Thomas Haller authored
(cherry picked from commit eceaa39a) (cherry picked from commit 8673206f)
-
Thomas Haller authored
(cherry picked from commit 0008c6c8) (cherry picked from commit 421844c8)
-
Thomas Haller authored
(cherry picked from commit 88ef02ec)
-
Thomas Haller authored
gcc-11.0.0-0.7.fc34 warns here: CC libnm-core/libnm_core_la-nm-setting-team.lo libnm-core/nm-setting-team.c: In function ‘nm_team_link_watcher_new_ethtool’: libnm-core/nm-setting-team.c:127:33: error: array subscript ‘NMTeamLinkWatcher[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 127 | watcher->ref_count = 1; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ libnm-core/nm-setting-team.c:125:15: note: referencing an object of size 16 allocated by ‘g_malloc’ 125 | watcher = g_malloc(nm_offsetofend(NMTeamLinkWatcher, ethtool)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libnm-core/nm-setting-team.c:128:33: error: array subscript ‘NMTeamLinkWatcher[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 128 | watcher->type = LINK_WATCHER_ETHTOOL; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ libnm-core/nm-setting-team.c:125:15: note: referencing an object of size 16 allocated by ‘g_malloc’ 125 | watcher = g_malloc(nm_offsetofend(NMTeamLinkWatcher, ethtool)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libnm-core/nm-setting-team.c:129:33: error: array subscript ‘NMTeamLinkWatcher[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 129 | watcher->ethtool.delay_up = delay_up; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ libnm-core/nm-setting-team.c:125:15: note: referencing an object of size 16 allocated by ‘g_malloc’ 125 | watcher = g_malloc(nm_offsetofend(NMTeamLinkWatcher, ethtool)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libnm-core/nm-setting-team.c:130:33: error: array subscript ‘NMTeamLinkWatcher[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 130 | watcher->ethtool.delay_down = delay_down; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ libnm-core/nm-setting-team.c:125:15: note: referencing an object of size 16 allocated by ‘g_malloc’ 125 | watcher = g_malloc(nm_offsetofend(NMTeamLinkWatcher, ethtool)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maybe we should not use this trick and just malloc() a struct of the intended size, however: - the code below does a similar thing, doing it differently for ethtool watcher is confusing. - the NMTeamLinkWatcher is a union which cannot alter its type. In no case is it correct to access the fields of the wrong union type. By allocating a smaller chunk, valgrind might catch such bugs. Also, NMTeamLinkWatcher's definition is private to the C source file, in no case must anybody assume that the rest of the buffer actually exists. Hence, workaround the warning by suppressing it. (cherry picked from commit e5699dbc) (cherry picked from commit 221547bc) (cherry picked from commit 8f3cf4f3) (cherry picked from commit 675c7df8) (cherry picked from commit 6efbf360)
-
Thomas Haller authored
(cherry picked from commit 3b95905a)
-
Thomas Haller authored
(cherry picked from commit c02710bb)
- 26 Oct, 2020 1 commit
-
-
On Fedora 33 when compiling NetworkManager it is failing with the following error: ``` ERROR: files left in build directory after distclean: ./docs/libnm/libnm.actions make[1]: *** [Makefile:18427: distcleancheck] Error 1 make[1]: Leaving directory '/builddir/nm-build/NetworkManager/NetworkManager-1.27.90/_build/sub' make: *** [Makefile:18356: distcheck] Error 1 Error make distcheck ``` Adding the file to the DISTCLEANFILES will enforce the removal of this file. Signed-off-by:
Fernando Fernandez Mancera <ffmancera@riseup.net> !659 (cherry picked from commit 9a935e51) (cherry picked from commit d28133ad) (cherry picked from commit e1c1369e) (cherry picked from commit 51b73ae6) (cherry picked from commit 0ea81a3d)
-
- 29 Sep, 2020 3 commits
-
-
Class description may contains double quotes which is not valid as XML attribute value. [thaller@redhat.com: adjust original patch to reformat code with python black] [thaller@redhat.com: adjusted patch during backport from nm-1-26 to nm-1-24] !620 (cherry picked from commit 54e25f23) (cherry picked from commit 7d267731) (cherry picked from commit 2899343b) (cherry picked from commit dc0c31bc)
-
Thomas Haller authored
The gtk-doc text that the tool receives is not XML, it's a plain text. When setting the plain text as XML attribute, we need to properly escape it. The previous XML escape code was naive, and didn't cover for a plain ampersand. [thaller@redhat.com: adjusted patch during backport from nm-1-26 to nm-1-24] (cherry picked from commit 1641cc1d) (cherry picked from commit 5b7d39f8) (cherry picked from commit 5c50280b) (cherry picked from commit aef7a0a6)
-
Thomas Haller authored
nm_setting_ip_config_next_valid_dns_option() API was added in libnm 1.2, but it was never exported in the ABI of libnm. It thus was unusable, and any user trying to link against it would have been unable to do so. Hide the API now entirely. It doesn't seem a very nice API. If we want to allow the user to validate option names, we should expose such a function to validate an option (not to fetch the next valid option from a profile). Fixes: 019943bb ('libnm-core: add dns-options property to NMSettingIPConfig') (cherry picked from commit e8e5c124) (cherry picked from commit 04946f71) (cherry picked from commit 098e713c) (cherry picked from commit d32148fd)
-
- 18 Sep, 2020 1 commit
-
- 09 Sep, 2020 2 commits
-
-
Thomas Haller authored
Fixes: 7691fe57 ('libnm: add new functions allowing passing options to RequestScan() D-Bus call')
- 08 Sep, 2020 13 commits
-
-
Thomas Haller authored
The detection for Ubuntu 16.04 was broken. By now /etc/os-release contains VERSION="16.04.7 LTS (Xenial Xerus)" (cherry picked from commit 12e85574) (cherry picked from commit 9f7736ea) (cherry picked from commit 89e01a19) (cherry picked from commit deb53ff5)
-
Thomas Haller authored
On Ubuntu 20.10, we build against ModemManager 1.14.0 and get a compiler warning: ../src/devices/wwan/nm-modem-broadband.c: In function 'try_create_connect_properties': ../src/devices/wwan/nm-modem-broadband.c:492:2: error: 'MMModemCapabilityDeprecated' is deprecated [-Werror=deprecated-declarations] 492 | if (MODEM_CAPS_3GPP (ctx->caps)) { | ^~ Suppress it. An alternative would be to drop the flag entirely. It seems the flag was never used (and never will be used). But if that's true, there is little harm done checking it. If it's not true, we better keep checking for older versions. mobile-broadband/ModemManager@0cd76bf1 (cherry picked from commit 03dc7590) (cherry picked from commit 12e4a4a5) (cherry picked from commit b6729446) (cherry picked from commit fb93ca28)
-
Thomas Haller authored
The matchfilecon API is deprecated for a very long time. Since selinux 3.1 the functions are also marked as deprecated in the header, which causes compiler warnings and build failures. Update the code to use selabel API instead. (cherry picked from commit 173533c3) (cherry picked from commit f5aafb9d) (cherry picked from commit bde9f102) (cherry picked from commit 67135e64)
-
Thomas Haller authored
(cherry picked from commit 176996fc) (cherry picked from commit 27999816)
-
Thomas Haller authored
On Fedora rawhide (34), valgrind gives a lot of warnings like: ./src/platform/tests/test-cleanup-linux.valgrind-log:--48279-- WARNING: unhandled amd64-linux syscall: 439 ./src/platform/tests/test-cleanup-linux.valgrind-log:--48279-- You may be able to write your own handler. ./src/platform/tests/test-cleanup-linux.valgrind-log:--48279-- Read the file README_MISSING_SYSCALL_OR_IOCTL. ./src/platform/tests/test-cleanup-linux.valgrind-log:--48279-- Nevertheless we consider this a bug. Please report ./src/platform/tests/test-cleanup-linux.valgrind-log:--48279-- it at http://valgrind.org/support/bug_reports.html. Ignore them. (cherry picked from commit 2cb40f6e) (cherry picked from commit 561bd7bb) (cherry picked from commit 09b5a72b) (cherry picked from commit e8155929)
-
Thomas Haller authored
g_steal_pointer() is marked as GLIB_AVAILABLE_STATIC_INLINE_IN_2_44, that means we get a deprecated warning. Avoid that. We anyway re-implement the macro so that we can use it before 2.44 and so that it always does the typeof() cast. (cherry picked from commit edfe9fa9) (cherry picked from commit 6936a061) (cherry picked from commit e333a28b)
-
Signed-off-by:
Antonio Cardace <acardace@redhat.com> Fixes: 9f960955 ('initrd: add configuration generator') (cherry picked from commit d5c05d07) (cherry picked from commit bba54613) (cherry picked from commit 67bb9896) (cherry picked from commit 5913e4ce)
-
Thomas Haller authored
Avoids a compiler warning: ../src/devices/nm-device.c:16079:26: error: cast to smaller integer type 'NMDeviceStateReason' from 'gpointer' (aka 'void *') [-Werror,-Wvoid-pointer-to-enum-cast] deactivate_ready (self, (NMDeviceStateReason) reason); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 121c58f0 ('core: set number of SR-IOV VFs asynchronously') (cherry picked from commit 918ebd60) (cherry picked from commit 32641b9f) (cherry picked from commit c24888be) (cherry picked from commit 3d274594)
-
Thomas Haller authored
On master this code was refactored and thereby the leak was fixed. Instead of backporting that, do an original patch for nm-1-24 to fix only the leak. Fixes: 121c58f0 ('core: set number of SR-IOV VFs asynchronously') (cherry picked from commit a28d4a30) (cherry picked from commit 2e0cb189)
-
Thomas Haller authored
Fixes: 8200078e ('lldp: support IEEE 802.3 TLVs') (cherry picked from commit 9b7c5ca1) (cherry picked from commit 4b84eeba) (cherry picked from commit 739417ab)
-
Thomas Haller authored
Fixes: 6c52d946 ('lldp: add support for management address TLV') (cherry picked from commit 7c0d73d9) (cherry picked from commit 0426681a) (cherry picked from commit 321f9b51)
-
Thomas Haller authored
This is a serious issue, because this is not guaranteed to be UTF-8 data. Fixes: 07a9364d ('device: export list of LLDP neighbors through D-Bus') (cherry picked from commit 8cd9b87c) (cherry picked from commit 94f8e9fb) (cherry picked from commit 90b1df47)
-
Thomas Haller authored
(cherry picked from commit 393bc8c8) (cherry picked from commit 10b0260d) (cherry picked from commit ff8ba801)
-