summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* team: perform cleanup immediately when connecting to teamd failsnm-1-24Beniamino Galvani2021-08-111-0/+1
| | | | | | | | | | | | | | | When NM fails to connect to teamd during an activation, it sets the device state to FAILED. Eventually the device will become DISCONNECTED and will call the ->deactivate() method that will perform the cleanup of timers, teamd process and teamdctl instance. However, in this way, when the device is DISCONNECTED timers are still armed and can be triggered in the wrong state. Instead, perform the cleanup immediately on failure. https://bugzilla.redhat.com/show_bug.cgi?id=1856723 (cherry picked from commit 26e97fcd0d4a70e32a484d3bfc57c1802da10554) (cherry picked from commit 680c0b88122077101cbfd878a70d54fb7a4afcea)
* team: merge branch 'bg/team-no-dbus-rh1784363'Beniamino Galvani2021-08-111-52/+129
|\ | | | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/513 https://bugzilla.redhat.com/show_bug.cgi?id=1784363 (cherry picked from commit b74c333413dfeaff5fb6007981c41c5fcfe8cb4c)
| * team: support operation without D-BusBeniamino Galvani2021-08-111-52/+120
| | | | | | | | | | | | | | | | When D-Bus is not available, detect that teamd is ready by watching the presence of the unix domain socket instead of the D-Bus name. https://bugzilla.redhat.com/show_bug.cgi?id=1784363 (cherry picked from commit d689380cfc5734a29b1302d68027190e1a606265)
| * team: ensure that teamd is running for assumed devicesBeniamino Galvani2021-08-111-0/+9
|/ | | | | | | | | | | When a team device is assumed, we skip stage1 and imply that teamd is already running. If this doesn't happen (for example because teamd was manually stopped or because the interface was created in the initrd), the team interface will continue processing traffic but will not react to changes in the environment (e.g. carrier changes). Ensure that teamd is running for assumed devices. (cherry picked from commit 7ac72f8655b909732f96ff4df6d102d2a3291085)
* device: add mechanism to call stage1 for external or assumed devicesBeniamino Galvani2021-08-112-11/+16
| | | | | | | | Usually stage1 is skipped for external or assumed devices. Add a mechanism to call stage1 for all devices, similarly to what was already done for stage2. (cherry picked from commit eff0e0d1233d834403accad29cb7ec05ea4f915b)
* merge: branch 'bg/tc-ignore'Beniamino Galvani2021-06-1812-153/+296
|\ | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1928078 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/871 (cherry picked from commit 74f9272d3d9e277b796c3360dbac7f5e4a352bd0) (cherry picked from commit 85b8b07e273e59cf12d98352b4b846e88f5ddf17) (cherry picked from commit ce0879cbe3362c251e849936cbea557174e67010) (cherry picked from commit 88a9173048724c4ade31cea4d616d77b66eac2a8)
| * ifcfg-rh: preserve an empty tc configurationBeniamino Galvani2021-06-188-26/+128
| | | | | | | | | | | | | | | | | | | | | | If the TC setting contains no qdiscs and filters, it is lost after a write-read cycle. Fix this by adding a new property to indicate the presence of the (empty) setting. (cherry picked from commit 6a88d4e55cf031da2b5a8458d21487a011357da4) (cherry picked from commit acf0c4df2b0fb0dc332aa929131953390998828f) (cherry picked from commit 4efcdf234d05d386314d370822f5e783071b5765) (cherry picked from commit d3ca2ed1fcbafbf05135b7f6c14bae5e090c26e1)
| * core,libnm: don't touch device TC configuration by defaultBeniamino Galvani2021-06-183-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkManager supports a very limited set of qdiscs. If users want to configure a unsupported qdisc, they need to do it outside of NetworkManager using tc. The problem is that NM also removes all qdiscs and filters during activation if the connection doesn't contain a TC setting. Therefore, setting TC configuration outside of NM is hard because users need to do it *after* the connection is up (for example through a dispatcher script). Let NM consider the presence (or absence) of a TC setting in the connection to determine whether NM should configure (or not) qdiscs and filters on the interface. We already do something similar for SR-IOV configuration. Since new connections don't have the TC setting, the new behavior (ignore existing configuration) will be the default. The impact of this change in different scenarios is: - the user previously configured TC settings via NM. This continues to work as before; - the user didn't set any qdiscs or filters in the connection, and expected NM to clear them from the interface during activation. Here there is a change in behavior, but it seems unlikely that anybody relied on the old one; - the user didn't care about qdiscs and filters; NM removed all qdiscs upon activation, and so the default qdisc from kernel was used. After this change, NM will not touch qdiscs and the default qdisc will be used, as before; - the user set a different qdisc via tc and NM cleared it during activation. Now this will work as expected. So, the new default behavior seems better than the previous one. https://bugzilla.redhat.com/show_bug.cgi?id=1928078 (cherry picked from commit a48edd0410c878d65fc5adcd5192b116ab6f8afc) (cherry picked from commit 2a8181bcd78d055b7cb9e6c0e026bc3b08231b5a) (cherry picked from commit de1449375ad0259af868a4dfa41118bef56e8493) (cherry picked from commit 97620ec18b1c325625bff06a2b8e05764c3a29ad)
| * move tc parsing out of nm-device.cBeniamino Galvani2021-06-183-115/+140
|/ | | | | | | The logic to create platform qdiscs from a setting does not belong to NMDevice. Move it to NetworkManagerUtils.h. (cherry picked from commit 283f7d0b308ed62a5634ac724819876e492f4c83)
* build/meson: fix build to always set "-W" compiler flagsThomas Haller2021-06-101-62/+57
| | | | | | | | | | | | | | | | | | | We must set these compiler flags independent as to whether this is a release build or a debug build. In most cases, we don't differentiate between release and debug build anyway. Granted, we have "-D more_asserts=100" and set "-O" CFLAGS, but that is more granular and not a simple "buildtype". In particular, these compiler flags apply to all kinds of builds. This is important, because otherwise we get build failures, because also in release build we want to build with `-Werror` and `-Wall`. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/692 (cherry picked from commit c0c6470e4d21cc7dfa6db27bb78b316304ff0756) (cherry picked from commit 6b316a1991e28430e551269affaac1508904cfcf) (cherry picked from commit 805c9fa8d439a37d16d5fef6dee8fb83648eb074)
* build: merge branch 'th/workaround-glib-atomic-pointer-get'Thomas Haller2021-06-1011-35/+123
|\ | | | | | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/667 (cherry picked from commit b57198a7bcde48b9b71d1fa013f97ffa93b492ca) (cherry picked from commit 90a36d5efea9ca8c9e42fa90fc48798b9b47da16) (cherry picked from commit dec74df55425b665d588c573a9e8315d9ccc257a)
| * libnm: with meson include "nm-default.h" for glib-mkenums sourcesThomas Haller2021-06-102-0/+2
| | | | | | | | | | | | | | | | We also do that for the autotools implementation. (cherry picked from commit fd57e9665cea3547ce63ad3d693d956cb8c286c7) (cherry picked from commit c807e77271af7972abcecd637cae85e7664cbcc9) (cherry picked from commit 63f2d73b970bba7d2b9ff5e67715e0aefe7fb2d2)
| * libnm/tests: include "nm-default.h" for ↵Thomas Haller2021-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "libnm-core/tests/nm-core-tests-enum-types.c" 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 755d97d38c62244e43a29b3d3426448003d1323b) (cherry picked from commit 294efba18f0e3f4beeaa482a0ee426ebd7bcd02c) (cherry picked from commit 2cff3f369b6bc80b346eae1754c90b3de2095636)
| * shared: don't enforce unset G_LOG_DOMAIN in "nm-default.h"Thomas Haller2021-06-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 42fa8f3d2722dd9fa987b95919f8dd42d23f0367) (cherry picked from commit a1f3cebbec68022f4665dc29aff1b58ef116c2c8) (cherry picked from commit 61d78ed3337d1682ea1ee255a0f7334e0b633342)
| * shared: also reimplement g_atomic_pointer_set() macroThomas Haller2021-06-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 7c60e984b6fe742f5719550bd7ccad64608ecb6e) (cherry picked from commit 6ded463f36d945658d601970b5089f2f887f4c5b) (cherry picked from commit 976b358be688864716ade41b94b5872ad95ff4f7)
| * shared: add a compat implementation for g_atomic_pointer_get()Thomas Haller2021-06-101-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 5e57ea37f0944bfa3441a51afb1bd5e81b8c5b41) (cherry picked from commit 1e4cfba6dc583ebe071506c42f2a04a9915959b0) (cherry picked from commit 446cac18ccb209334644d1347f300599da14c0b9)
| * introspection: avoid compiler warning in generated introspection filesThomas Haller2021-06-105-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 03d9ec27face7f54e15f6fe6532c59f8b66bb6b4) (cherry picked from commit 595c5854ad068ae025b36d36f5204465186a7145) (cherry picked from commit 3a31fc459adbe48016955afc68a7921045ead408)
| * build: don't depend dispatcher code on introspection sourcesThomas Haller2021-06-101-2/+0
| | | | | | | | | | | | | | | | | | The dispatcher code does not use the generated introspection sources (anymore). Don't add a dependency. (cherry picked from commit e0a3a5e2f82f2dc2b802c91b7cfa2d86f5e093d6) (cherry picked from commit 6ba600cb38ba94724ed7e45c496c254ddd1e24ff) (cherry picked from commit b8a172a6228deab4d18ee666a4c9a4d636f8c479)
| * tests: avoid race condition in nmtstc_service_cleanup()Thomas Haller2021-06-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 1b8ccacc5da943f6c460d06f42cceb00f390b2b0) (cherry picked from commit d10d14d7ba2bfc404e3862277fcc47f10b84255f) (cherry picked from commit d34e6193da7ec23da9c254c821ec8b4583c65be1)
| * shared/tests: add nmtst_main_context_iterate_until_full() helperThomas Haller2021-06-101-10/+32
| | | | | | | | | | | | (cherry picked from commit 230250e62900be4ba71f90c391e25638f476125e) (cherry picked from commit 20cfc1f395a175675a8b42a2477faa4895de4e1e) (cherry picked from commit c6666589a8672c58086cac828724e34052b65dd3)
| * shared/tests: add nmtst_g_source_nop() helperThomas Haller2021-06-101-0/+7
|/ | | | | | (cherry picked from commit ca2b79d9aa9999bdb09b31599a4bd942122b282e) (cherry picked from commit ddb69b211ce2aaeda45ca4afb664b25e9c0dfd94) (cherry picked from commit e069982492440203b9b7b4982d8904146c85c0b9)
* platform/tests: better handling "timeout_msec" argument in ↵Thomas Haller2021-06-101-1/+5
| | | | | | | | | | | | | | | | nmtst_main_context_iterate_until() 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 6cb688840461c0093337e66184bcd1a5106a8c3f) (cherry picked from commit 4d572bea7e5dad287d436e0ac48ab3c4c7bed7f3) (cherry picked from commit 95b74a3bdee81e0c713f7a6d162642625742dd63)
* libnm: suppress "-Warray-bounds" warning in nm_team_link_watcher_new_ethtool()Thomas Haller2021-06-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 e5699dbcb7aa56b49b9fae442e61fc254249b595) (cherry picked from commit 221547bc21b033f53078d173d4c767a52cc4bca8) (cherry picked from commit 8f3cf4f3e86707a561a0919ae8c809428a4db00e)
* device: clean up dispatcher calls when canceling an activationBeniamino Galvani2021-01-141-0/+1
| | | | | | | | | | | Ensure the callback for dispatcher calls is not executed, or it will resume the activation chain we want to interrupt. https://bugzilla.redhat.com/show_bug.cgi?id=1888348 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/723 (cherry picked from commit 8180b0180beba0c492bf172a32069c77e501f884) (cherry picked from commit 88eb0beb5277da7973bf0f22bfd547abb4396988) (cherry picked from commit cdbd6bd9e139d11aacd2447994599763ab3624cd)
* shared: fix race in nm_ref_string_unref()Thomas Haller2020-12-101-8/+9
| | | | | | | | | | | | | | | | | | | We cannot drop the reference count to zero while having no lock. Otherwise, another thread might race doing s = nm_ref_string_new("..."); nm_ref_string_unref(s); and already successfully delete the instance. Hitting this race should be rather difficult, especially because we tend to use NMRefString only from one thread. But still, access to global variables must be race free. Fixes: 908fadec964e ('shared: add NMRefString') (cherry picked from commit 3490a09a7d966d11b971d08a2bb802f76f6d5e58) (cherry picked from commit 1a68a54471d304b150a9e9ace43c2fe3f939f139) (cherry picked from commit 71f56a5d76352f673166c3451984f265b4de1431)
* libnm: fix re-entrancy of NMClient.dispose() for _init_release_all()Thomas Haller2020-12-101-2/+2
| | | | | | | | | | | | | GObject's dispose() functions may be called multiple times to break reference cycles. As dispose() calls _init_release_all(), the object might already be partially destroyed. Fixes: ce0e898fb476 ('libnm: refactor caching of D-Bus objects in NMClient') (cherry picked from commit ef6edd8dbd871e267ff570395c50bb17fc509bcc) (cherry picked from commit 9659db281f0e322d91e1ef4938f7ea1fa028c8b8) (cherry picked from commit a744397ad56c93dfaf80fd576e70e1a8dedbdf98)
* wifi: fix evaluating the scanning state for wpa-supplicantThomas Haller2020-12-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | wpa_supplicant has a property "scanning" and a "state=scanning". Previously, NetworkManager considered both parts to indicate whether supplicant is currently scanning (if either the property or the state indicated scanning, it took that as indication for scanning). If NetworkManager thinks that supplicant is scanning, it suppresses explicit "Scan" requests. That alone is not severe, because the "Scan" request is only to trigger a scan in supplicant (which supplicant possibly is already doing in state "scanning"). However, what is severe is that NetworkManager will also block autoconnect while supplicant is scanning. That is because NetworkManager wants to get a complete scan result before deciding which network to connect to. It seems that wpa_supplicant can get into "state=scanning" and stay there indefinitely. This prevents NetworkManager from autoactivating a profile. Fix that, to only honor the "scanning" property. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/597 Fixes: b83f07916a54 ('supplicant: large rework of wpa_supplicant handling') (cherry picked from commit 8cadfed2fe3540c04572fec283bdf09e14113192) (cherry picked from commit fbe6240a7d631156e80cf68ad8308476ed36dc6e) (cherry picked from commit 2bec392e563b31aa383580fe27765af18b493bfa)
* core: recognize "wifi.scan-generate-mac-address-mask" as valid ↵Thomas Haller2020-12-083-1/+3
| | | | | | | | | | | "NetworkManager.conf" option Fixes: 32f4abe90b72 ('config: warn about unknown keys in config files') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/595 (cherry picked from commit d615b902d8ded3f5de36704a3f3f00680899b40b) (cherry picked from commit 3b1ae89d2fa5b612a9a87a8949100aa264c40a86) (cherry picked from commit def7533c64d6c4aaedc23771cf0c8153ab84cd76)
* dns: fix leak of NMDnsSystemdResolvedPrivate.dirty_interfacesThomas Haller2020-12-081-0/+1
| | | | | Fixes: c1e6d4e8a16a ('dns: sd-resolved: reset interface configuration on deactivation') (cherry picked from commit 3595e5d42e57c28904859a85d30d3294b277d244)
* shared: fix NM_CAST_STRV_CC() for "char **const" pointersThomas Haller2020-12-081-6/+12
| | | | | | | | | | | | | | | | | | | | | clang-3.4.2-9.el7.x86_64 otherwise fails: ../src/devices/wifi/nm-wifi-p2p-peer.c:410:44: error: controlling expression type 'const char **const' not compatible with any generic association type if (!nm_utils_strv_equal(priv->groups, peer_info->groups)) { ^~~~~~~~~~~~~~~~~ ../shared/nm-glib-aux/nm-shared-utils.h:1689:78: note: expanded from macro 'nm_utils_strv_equal' #define nm_utils_strv_equal(strv1, strv2) (nm_utils_strv_cmp_n((strv1), -1, (strv2), -1) == 0) ^ ../shared/nm-glib-aux/nm-shared-utils.h:1687:74: note: expanded from macro 'nm_utils_strv_cmp_n' _nm_utils_strv_cmp_n(NM_CAST_STRV_CC(strv1), (len1), NM_CAST_STRV_CC(strv2), (len2)) ^ ../shared/nm-glib-aux/nm-macros-internal.h:706:21: note: expanded from macro 'NM_CAST_STRV_CC' (_Generic ((value), \ ^ (cherry picked from commit 8dc3f07d34d74e37b06461bf311a57df037ca50c) (cherry picked from commit d585ccdb7c2a3307953e099ebd1a2131e03d2419) (cherry picked from commit 9b8a60a9a3153d35fcee072387bd84fa826a55e7)
* core: fix modifying connection during recheck_assume_connection()Thomas Haller2020-12-081-2/+6
| | | | | | | | | | | | | | | | | | | Since commit d35d3c468a30 ('settings: rework tracking settings connections and settings plugins') must settings connections not be modified. They must be treated immutable and only updated by replacing them with a new variant. There is even an assertion for that. Fix the code that attempts to modify an existing NMConnection. https://bugzilla.redhat.com/show_bug.cgi?id=1900536 Fixes: f2fe6c03ee3f ('manager: don't treat the initramfs-configured DHCP connections as generated') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/690 (cherry picked from commit eed23269bdf2294a3c419bded6dc5475de19fce9) (cherry picked from commit 9596fd1c7468c5c053e2f2fc7c6c61511da4896d) (cherry picked from commit 0135f9efd2abdcc3d92329d302fc5340c63cbe23)
* core/ovs: fix leak of "NMOvsdbPrivate.db_uuidThomas Haller2020-12-081-1/+5
| | | | | | | | | | Also, never update the value to %NULL. If the current message does not contain a UUID, keep the previous one. Fixes: 830a5a14cb29 ('device: add support for OpenVSwitch devices') (cherry picked from commit 609b08e2eb6a10ca1ca87725207eafa5ac4f4b83) (cherry picked from commit 0464c36a0217ca1977b73078b824be86e05cfc48) (cherry picked from commit e1424f264d22e0b73a11a40139818bc1c4f752eb)
* iwd: Fix a use after freeAndrew Zaborowski2020-12-081-2/+3
| | | | | | | | | | In connection_removed we use the id.name that was being g_freed a few lines further down. Fixes: bea6c403677f ('wifi/iwd: handle forgetting connection profiles') (cherry picked from commit c1ff06e11945d635c39ddaf8ec00939054fc4308) (cherry picked from commit 03b63a893f19f6a88385f927a7386abe534c4d04) (cherry picked from commit 09c4fa5a6cae5bef38cc6d2d0a7888e22fe85802)
* device/wifi: don't reset the SSID of a NMWifiAP to unknownThomas Haller2020-12-081-9/+11
| | | | | | | | | | | | | | | | | | | | | | For hidden networks, we usually don't have an SSID. We try to match and fill the SSID based on the profiles that we have: <debug> [1603798852.9918] device[6b383dca267b6878] (wlp2s0): matched hidden AP AA:BB:CC:DD:EE:FF => "SSID" However, we should not clear that value again on the next update: <trace> [1603798856.5724] sup-iface[66c1a0883a262394,0,wlp2s0]: BSS /fi/w1/wpa_supplicant1/Interfaces/0/BSSs/3 updated <debug> [1603798856.5726] device[6b383dca267b6878] (wlp2s0): wifi-ap: updated AA:BB:CC:DD:EE:FF (none) Once we have a SSID, we can only update it to a better value, but not clear it. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/438 Fixes: b83f07916a54 ('supplicant: large rework of wpa_supplicant handling') (cherry picked from commit eb36380335d39a3959135453be4dccd561405a5b) (cherry picked from commit 40edd49025fcbe6690b773a9d538741dc69fb98d) (cherry picked from commit 42d28ae2e8dddc05e0fe8b433ab1fca889574668)
* wifi: re-add code for tracking a peers groupsBenjamin Berg2020-12-083-3/+23
| | | | | | | | | | | | | | | The code to track the property was accidentally removed in commit 21d4a2618868 ('core: remove code for unused NM_WIFI_P2P_PEER_GROUPS property') causing all P2P connections to fail after 5 seconds. Fixes: 21d4a2618868 ('core: remove code for unused NM_WIFI_P2P_PEER_GROUPS property') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/551 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/650 (cherry picked from commit dc54a946acb968c73f8d55e01c61efedb4ae6cc1) (cherry picked from commit 9cd4968b7b5eee656fbd81fcdf30381fb985d473) (cherry picked from commit b5310115d1b9ebecb12748dd0e51066d3f4d8152)
* shared: add nm_utils_strv_dup_packed() utilThomas Haller2020-12-083-0/+119
| | | | | (cherry picked from commit 2e0cd52474da9998b187b8aa3ba65f3686ad4d7e) (cherry picked from commit c067e55205d933fcbe2ef35e62fc2dd1372c79cc)
* cli: fix showing active state for `nmcli con show` with fieldsThomas Haller2020-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With "connection.multi-connect", a profile can be activated multiple times on a device with `nmcli connection show`. Also, a profile may be in the process of deactivating on one device, while activating on another one. So, in general it's possible that `nmcli connection show` lists the same profile on multiple lines (reflecting their multiple activation states). If the user requests no fields that are part of the activation state, then the active connections are ignored. For example with `nmcli -f UUID,NAME connection show`. In that case, each profile is listed only once. On the other hand, with `nmcli -g UUID,NAME,DEVICE connection show` the user again requested also to see the activation state, and a profile can appear multiple times. To handle that, we need to consider which fields were requested. There was a bug where the "ACTIVE" field was not treated as part of the activation state. That results in `nmcli -f UUID,NAME,ACTIVE connection show` always returning "no". Fix that. Fixes: a1b25a47b08c ('cli: rework printing of `nmcli connection` for multiple active connections') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/547 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/642 (cherry picked from commit 4eb3b5b9ddf3cf9ef453340022e461c6bb4e4dec) (cherry picked from commit bb802507e475921f747975cfaf91e292065b69dc) (cherry picked from commit 8bd6d2a63e1acc6205ead7eb70cdf8beb95c0cb1)
* device/wifi: fix leak of NMSupplicantPeerInfo.peer_path in NMSupplicantInterfaceThomas Haller2020-12-081-0/+2
| | | | | | | Fixes: b83f07916a54 ('supplicant: large rework of wpa_supplicant handling') (cherry picked from commit 3cf8620294e83960c97961d096be19ece5c57ea5) (cherry picked from commit 4b11029df9fe6e4bd874155a8887322dbff62f69) (cherry picked from commit bd5da809caeef3cf2a6d8282dbdac8c67bc2d87a)
* shared: make NM_STR_BUF_INIT() an inline functionThomas Haller2020-12-081-7/+12
| | | | | | | | | | | | | | | In the previous form, NM_STR_BUF_INIT() was a macro. That makes sense, however it's not really possible to make that a macro without evaluating the reservation length multiple times. That means, NMStrBuf strbuf = NM_STR_BUF_INIT (nmtst_get_rand_uint32 () % 100, FALSE); leads to a crash. That is unfortunate, so instead make it an inline function that returns a NMStrBut struct. Usually, we avoid functions that returns structs, but here we do it. (cherry picked from commit c6809df4cdf2f909ffcd98e842447fca523f1c0b) (cherry picked from commit 3ed95f308f5ef94ffd4289e80592e0567365e5f9)
* shared: allow empty NMStrBuf buffers with un-allocated memoryThomas Haller2020-12-082-15/+28
| | | | | | | | | | | | Previously, for simplicity, NMStrBuf did not support buffers without any data allocated. However, supporting that has very little overhead/complexity, so do it. Now you can initialize buffers to have no data allocated, and when appending data, it will automatically grow. (cherry picked from commit 83c79bc7a82ea513574cd08a38115a485921b1fa) (cherry picked from commit 5216e5c012475a65699ab98a38cbf7358196b914)
* dns: sd-resolved: fix hash table iterationBeniamino Galvani2020-11-301-1/+3
| | | | | | | | | g_hash_table_iter_next() wants a (gpointer *), not an (int *). Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation') (cherry picked from commit 526b484be1981b4bfcc5e48d5480c6ac7ccd8b66) (cherry picked from commit dedcba61ef79c09c40eeaea3aa90a871097cbda3) (cherry picked from commit b42696d70b08ecd2fa4aa3854acc297e1ac18f38)
* dns: sd-resolved: fix hash table initializationBeniamino Galvani2020-11-091-2/+1
| | | | | | | | | | | | The hash table was not initialized if there was no D-Bus connection at the time of object creation. Fixes: f70ee67058c9 ('dns: sd-resolved: reset interface configuration on deactivation') https://bugzilla.redhat.com/show_bug.cgi?id=1894839 (cherry picked from commit d6457902d127f2a29be4d12fe5b9ae94e3106b57) (cherry picked from commit cd58512ba362167b8ed3399c5677d60f917af144) (cherry picked from commit 8c7049b4f0b86e7d89ace41a7e919d2ebe573f91)
* dns: sd-resolved: reset interface configuration on deactivationBeniamino Galvani2020-11-091-7/+44
| | | | | | | | | | | | | If an update doesn't contain an interface but the previous update did, the systemd-resolved DNS plugin must send a request to clear the previous configuration. Otherwise the previous DNS configuration would persist even after interface deactivation. https://bugzilla.redhat.com/show_bug.cgi?id=1888229 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/662 (cherry picked from commit f70ee67058c92a97549dc4aca11ef0567373efbf) (cherry picked from commit a9c952d34cb6ed2e09091da64300337f29973b77) (cherry picked from commit c1e6d4e8a16ac419c66feb1de649a2f0abc53ee6)
* Makefile: remove "libnm.actions" explicitly when uninstallingFernando Fernandez Mancera2020-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/659 (cherry picked from commit 9a935e516e7015ef3a9224e034b8de9933e584d5) (cherry picked from commit d28133ad0dd44c501f33b1d46be46a7dbe594ade) (cherry picked from commit e1c1369eefe48e537321e6f3731e3594103d9161)
* manager: fix very bad usage of 'nm_utils_user_data_unpack'Antonio Cardace2020-10-221-1/+8
| | | | | | | | | | | | This results in the args of 'nm_utils_user_data_unpack' containing random data potentially also from the previous stack-frame which is really really bad. Signed-off-by: Antonio Cardace <acardace@redhat.com> Fixes: b50702775f1b ('device: implement auth-request as async operation nm_manager_device_auth_request()') (cherry picked from commit b6a18e059302117157971e7c5f551fc40d864e89) (cherry picked from commit 50adaf7414a62f08a309f11941453eae75c9e0e9) (cherry picked from commit 72a2e34b42e9f6e38ba2fc5b5db96015930827a2)
* build/docs: fix generated XML syntax in ↵Valentin David2020-09-291-1/+8
| | | | | | | | | | | | | | tools/generate-docs-nm-settings-docs-gir.py 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] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/620 (cherry picked from commit 54e25f23f53af889703dfc50d51a8afeeea8a439) (cherry picked from commit 7d26773138dd4270c45e131761d4e6be58f64d12)
* docs: fix escaping XML in "tools/generate-docs-nm-settings-docs-gir.py"Thomas Haller2020-09-291-6/+8
| | | | | | | | | | | | 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 1641cc1d03941e543da716bc68ff059c5a984f37) (cherry picked from commit 5b7d39f8e166288b999f469925710e891a50a1b1)
* policy: get the DHCPv6 hostname from the FQDN optionBeniamino Galvani2020-09-291-1/+1
| | | | | | | | | There isn't any 'host-name' option for DHCPv6. Read instead the 'fqdn-fqdn' option that carries the FQDN assigned by the server to the client. (cherry picked from commit 1f74ea52f5818c6e7d5cacd1dffdb2e1f5ee1913) (cherry picked from commit 4e1da002a920888daf5bb3aa4bd21a2d61e3214b)
* dhcp: export the DHCPv6 FQDN optionBeniamino Galvani2020-09-293-0/+11
| | | | | | | | The dhclient backend already exports all the option passed by dhclient, including the FDQN. Export it also for the systemd backend. (cherry picked from commit 1621a6ddb1b3f5c51ad774012150bd56cf65fcea) (cherry picked from commit c6a7618f2be4236997362db43cf44a3fdee2d9c9)
* systemd: dhcp6: parse the FQDN optionBeniamino Galvani2020-09-296-43/+129
| | | | | | | | Parse option 39 (Client Fully Qualified Domain Name, RFC 4704) from the DHCP reply, which specifies the FQDN assigned by the server to the client. https://github.com/systemd/systemd/commit/c43eea9f2effbb066901a61eafef473558d37b0f (cherry picked from commit 813fb7d64ee4cb0f935a3a15b9f5b8f5771655da)