-
Beniamino Galvani authored2b9283da
-
Lubomir Rintel authored
Before, we would just ignore the errors when we passed an invalid value to a property alias: $ nmcli c add type ethernet mac Hello Connection 'ethernet-1' (242eec76-7147-411a-a50b-336cf5bc8137) successfully added. $ nmcli c show 242eec76-7147-411a-a50b-336cf5bc8137 |grep 802-3-ethernet.mac-address: 802-3-ethernet.mac-address: -- ...or crash, because the GError would still be around: $ nmcli c add type ethernet mac Hello ethernet.mac-address World (process:734670): GLib-WARNING **: 14:52:51.436: GError set over the top of a previous GError or uninitialized memory. This indicates a bug in someone's code. You must ensure an error is NULL before it's set. The overwriting error message was: Error: failed to modify 802-3-ethernet.mac-address: 'World' is not a valid Ethernet MAC. Error: failed to modify 802-3-ethernet.mac-address: 'Hello' is not a valid Ethernet MAC. Now we catch it early enough: $ nmcli c add type ethernet mac Hello Error: failed to modify 802-3-ethernet.mac-address: 'Hello' is not a valid Ethernet MAC. Fixes: 40032f46 ('cli: fix resetting values via property alias') !1134 (cherry picked from commit a7ef0681)
dde7d4b5 -
Beniamino Galvani authored
Fixes: bb832641 ('rpm: remove build-time default for plugins on newer distros') (cherry picked from commit b580741e)
3811e6ae -
Thomas Haller authored
See-also: https://fedoraproject.org/wiki/Changes/CurlMinimal_as_Default#Benefit_to_Fedora See-also: https://github.com/systemd/systemd/commit/55b90ee00b78a449c8f187a5e8141f8ccb100bf4 !1121 (cherry picked from commit 7a173492)
-
When cloud-init job (metadata service crawler) starts, it sends the SIGTERM signal to nm-cloud-setup and force the nm-cloud-setup to restart, however, because the error is not initialized as NULL in `_init_start_cancelled_cb()` before it is set, nm-cloud-setup will hit a dumped core. TO fix it, initialize the error as NULL in `_init_start_cancelled_cb()`. https://bugzilla.redhat.com/show_bug.cgi?id=2027674 Fixes: ce0e898f ('libnm: refactor caching of D-Bus objects in NMClient') Backtrace: #0 g_logv (log_domain=0x7f833a872071 "GLib", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=<optimized out>) at ../glib/gmessages.c:1413 #1 0x00007f833a81f043 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>) at ../glib/gmessages.c:1451 #2 0x00007f833ab97230 in nm_utils_error_set_cancelled (is_disposing=<optimized out>, instance_name=<optimized out>, error=0x7ffff79cb980) at src/libnm-glib-aux/nm-shared-utils.c:2599 #3 nm_utils_error_set_cancelled (is_disposing=0, instance_name=0x0, error=0x7ffff79cb980) at src/libnm-glib-aux/nm-shared-utils.c:2590 #4 _init_start_cancelled_cb (cancellable=<optimized out>, user_data=0x5640ca292150) at src/libnm-client-impl/nm-client.c:7324 #5 _init_start_cancelled_cb (cancellable=<optimized out>, user_data=0x5640ca292150) at src/libnm-client-impl/nm-client.c:7307 #6 0x00007f833a93094a in _g_closure_invoke_va (param_types=0x0, n_params=<optimized out>, args=0x7ffff79cbb40, instance=0x5640ca267020, return_value=0x0, closure=0x5640ca29d430) at ../gobject/gclosure.c:873 #7 g_signal_emit_valist (instance=0x5640ca267020, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7ffff79cbb40) at ../gobject/gsignal.c:3406 #8 0x00007f833a930a93 in g_signal_emit (instance=instance@entry=0x5640ca267020, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553 #9 0x00007f833a9a6475 in g_cancellable_cancel (cancellable=0x5640ca267020) at ../gio/gcancellable.c:513 #10 g_cancellable_cancel (cancellable=0x5640ca267020) at ../gio/gcancellable.c:487 #11 0x00005640ca1a8bd4 in sigterm_handler (user_data=0x5640ca267020) at src/nm-cloud-setup/main.c:599 #12 0x00007f833a819d4f in g_main_dispatch (context=0x5640ca268ef0) at ../glib/gmain.c:3337 #13 g_main_context_dispatch (context=0x5640ca268ef0) at ../glib/gmain.c:4055 #14 0x00007f833a86e608 in g_main_context_iterate.constprop.0 (context=0x5640ca268ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4131 #15 0x00007f833a819463 in g_main_loop_run (loop=0x5640ca24fdb0) at ../glib/gmain.c:4329 #16 0x00005640ca1a6d04 in nmc_client_new_waitsync (cancellable=0x5640ca267020, out_nmc=0x7ffff79cbfa0, error=0x7ffff79cbf98, first_property_name=0x5640ca1b11db "instance-flags", first_property_name=0x5640ca1b11db "instance-flags") at src/libnm-client-aux-extern/nm-libnm-aux.c:129 #17 0x00005640ca1a3863 in main (argc=1, argv=<optimized out>) at src/nm-cloud-setup/main.c:639 (cherry picked from commit 549761b0)
-
Thomas Haller authored
Found with `git grep 'GError.*[^,)];'| grep ' *= *NULL;' -v` Fixes: ce0e898f ('libnm: refactor caching of D-Bus objects in NMClient') (cherry picked from commit a9d521bf)
-
Thomas Haller authored
(cherry picked from commit 5dc9307a)
-
Thomas Haller authored
NMClient is strongly tied to the GMainContext with which it was created. Several operations must only be called from within the context. There was an assertion for that. However, creating (and init_async()) should be allowed to call not from within the GMainContext. So if the current context has no owner (is not acquired), then it's also OK. Fix the assertion for that. Fixes: ce0e898f ('libnm: refactor caching of D-Bus objects in NMClient') (cherry picked from commit ae0cc961)
-
Thomas Haller authored
Found with `git grep 'GError.*[^,)];'| grep ' *= *NULL;' -v` Fixes: d689380c ('team: support operation without D-Bus') (cherry picked from commit 43748d29)
-
Thomas Haller authored
Found with `git grep 'GError.*[^,)];'| grep ' *= *NULL;' -v` Fixes: a2abd15f ('DHCP: Support dhcpcd-9.x') (cherry picked from commit fd503232)
-
Thomas Haller authored
nm_g_idle_add_source() is supposed to work like g_idle_add(). Use the correct priority. I think this causes little actual problems, because usually we don't carefully tune the priorities and would be mostly fine with either. Fixes: 6b18fc25 ('shared: add nm_g_{idle,timeout}_add_source() helpers') (cherry picked from commit 15e88379)
-
Thomas Haller authored
Recent python-black (22.0) dropped support for Python 2 and thus fail for those files. Make the examples Python3 compatible. (cherry picked from commit 95e6a0a6)
-
Beniamino Galvani authored
PPP supports IPv6 autoconfiguration. Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration') (cherry picked from commit 041df05f)
d3615b2a -
Beniamino Galvani authored
It's not going to work. Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration') (cherry picked from commit 7b2bea7c)
94702568 -
Beniamino Galvani authored
When a NMDevice is involved in a PPPoE activation, it means that the connection has connection.interface-name=<ethernet-interface>. In such case, the ppp ifindex should be set as ip-ifindex of the ethernet device. Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration') (cherry picked from commit aa9b5e28)
4dbf0bfc -
Beniamino Galvani authored
!1148 (cherry picked from commit 3a8a1b0e)
6e02ab13
- configure.ac 1 addition, 1 deletionconfigure.ac
- contrib/fedora/rpm/NetworkManager.spec 3 additions, 1 deletioncontrib/fedora/rpm/NetworkManager.spec
- examples/python/gi/dns.py 7 additions, 7 deletionsexamples/python/gi/dns.py
- examples/python/gi/get-devices.py 18 additions, 12 deletionsexamples/python/gi/get-devices.py
- examples/python/gi/get-lldp-neighbors.py 3 additions, 3 deletionsexamples/python/gi/get-lldp-neighbors.py
- man/nmcli.xml 14 additions, 0 deletionsman/nmcli.xml
- meson.build 1 addition, 1 deletionmeson.build
- src/core/devices/nm-device-ethernet.c 30 additions, 4 deletionssrc/core/devices/nm-device-ethernet.c
- src/core/devices/nm-device-ppp.c 3 additions, 4 deletionssrc/core/devices/nm-device-ppp.c
- src/core/devices/team/nm-device-team.c 1 addition, 1 deletionsrc/core/devices/team/nm-device-team.c
- src/core/dhcp/nm-dhcp-dhcpcd.c 1 addition, 1 deletionsrc/core/dhcp/nm-dhcp-dhcpcd.c
- src/core/nm-connectivity.c 1 addition, 0 deletionssrc/core/nm-connectivity.c
- src/libnm-client-impl/nm-client.c 7 additions, 8 deletionssrc/libnm-client-impl/nm-client.c
- src/libnm-glib-aux/nm-shared-utils.c 20 additions, 0 deletionssrc/libnm-glib-aux/nm-shared-utils.c
- src/libnm-glib-aux/nm-shared-utils.h 3 additions, 1 deletionsrc/libnm-glib-aux/nm-shared-utils.h
- src/nm-cloud-setup/nm-http-client.c 1 addition, 0 deletionssrc/nm-cloud-setup/nm-http-client.c
- src/nmcli/connections.c 10 additions, 10 deletionssrc/nmcli/connections.c