summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
3 hourslibnm: ignore "Peer" property on Device.Veth interfaceHEADmasterThomas Haller1-0/+3
With LIBNM_CLIENT_DEBUG=trace we get warnings: libnm-dbus: <warn > [31459.06461] nmclient[cc68a57bb44f1427]: get-managed-objects: [/org/freedesktop/NetworkManager/Devices/11]: ignore unknown property org.freedesktop.NetworkManager.Device.Veth.Peer
2 dayslicense: add Taegil to RELICENSE.mdThomas Haller1-0/+1
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/397#note_449957
2 daysmeson: merge branch 'inigomartinez/meson-license'Thomas Haller65-0/+130
Add SPDX license headers for meson files. As far as I can tell, according to RELICENSE.md file, almost everybody who contributed to the meson files agreed to the LGPL-2.1+ licensing. This entails the vast majority of code in question. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/397
2 dayscore: prevent multiple attempts to create default wired connectionThomas Haller1-1/+8
Scenario: - have ethernet connection as unmanaged. - create (or have) a suitable profile for the connection. - make the device as managed. No default wired connection gets created. - delete the profile. Note that NMManager does in manager_device_state_changed(): »···if (NM_IN_SET (new_state, »··· NM_DEVICE_STATE_UNAVAILABLE, »··· NM_DEVICE_STATE_DISCONNECTED)) »···»···nm_settings_device_added (priv->settings, device); that means, when the device the next time goes through UNAVAILABLE/DISCONNECTED states, we will suddenly create the default "Wired connection 1" profile. That doesn't seem right. When a device is suitable to have a default-wired connection, we should only check once whether to create it. We should not retry that later. The !no-auto-default mechanism exists so we can start NetworkManager without a profile for the device. It doesn't mean that we later one (after previously deciding not to create a profile), we still create it. https://bugzilla.redhat.com/show_bug.cgi?id=1687937 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/450
3 daysinitrd: fix build error with assertions disabledBeniamino Galvani1-0/+1
$ meson -Dmore_asserts=0 meson-build $ ninja -C meson-build [712/859] Compiling C object 'src/initrd/b383957@@nmi-core@sta/nmi-cmdline-reader.c.o'. ../src/initrd/nmi-cmdline-reader.c: In function ‘nmi_cmdline_reader_parse’: ../src/initrd/nmi-cmdline-reader.c:871:4: warning: ‘s_ip’ may be used uninitialized in this function [-Wmaybe-uninitialized] 871 | nm_setting_ip_config_add_dns (s_ip, ns); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/initrd/nmi-cmdline-reader.c:835:21: note: ‘s_ip’ was declared here 835 | NMSettingIPConfig *s_ip; | ^~~~ Fixes: 25a2b6e14ff5 ('initrd: rework command line parsing')
3 dayswwan: merge branch 'a-wai/NetworkManager-fix-sim-unlock'Antonio Cardace2-1/+11
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/452 Fixes https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/397 Reviewed-by: Antonio Cardace <acardace@redhat.com>
3 daysnm-modem: don't fail if secrets request times outArnaud Ferraris1-1/+2
When starting with a locked modem, it may take some time for the user to enter the PIN code, leading to the secrets request timing out. In that case, we want the connection activation to be retried automatically once the modem is unlocked, which can't be achieved if we propagate the error, as the device will change state to 'failed'. This patch ignores the 'no-secrets' error, as it means either the request has timed out, or the user cancelled the request without notifying NetworkManager. By doing this, we allow the connection to be re-activated once the modem is unlocked. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
3 daysnm-device-modem: deactivate device when modem unlockedArnaud Ferraris1-0/+9
When the modem is unlocked externally to NetworkManager, it is kept in the 'need-auth' state. The current connection activation continues as if nothing had changed, and the secrets request for the PIN code (which is no longer necessary) eventually times out. The device state is then changed to 'failed', meaning there won't be a new try at activating the default connection automatically. In order to prevent this, and retry activating the default connection when the modem gets unlocked, we change the device state to 'deactivating' when we identify the modem has been unlocked externally. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
4 daysinitrd: branch 'bg/initrd-cmdline-fixes'Beniamino Galvani3-226/+426
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/447
4 daysinitrd: add 'reader_' prefix to functions acting on ReaderBeniamino Galvani1-65/+68
4 daysinitrd: rework command line parsingBeniamino Galvani2-163/+309
The 'default_connection' created by the command line parser has multiple purposes. It's the connection created for 'ip=' arguments without command line, but is also created when there is a 'bootdev=' or for 'nameserver=' and no other connection exists at the moment the argument is parsed. This is confusing and leads to a result that depends on the order of parameters. For example: $ /usr/libexec/nm-initrd-generator -c connections -- bootdev=eth1 ip=eth0:dhcp $ ls connections/ default_connection.nmconnection eth0.nmconnection $ /usr/libexec/nm-initrd-generator -c connections -- ip=eth0:dhcp bootdev=eth1 $ ls connections/ eth0.nmconnection eth1.nmconnection Make this more explicit by tracking 'bootdev_connection' and 'default_connection' individually. Also fix handling of 'nameserver', 'rd.peerdns' and 'rd.route' arguments. First process all connections, and then set those properties. In particular, now nameservers are applied to all connections. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/391
4 daysinitrd: sort ibft connectionsBeniamino Galvani1-3/+6
Instead of adding ibft connections in a random order to the list, sort them alphabetically.
4 daysinitrd: keep connections sortedBeniamino Galvani1-76/+122
Connections are kept in a hash table indexed by name. This causes non deterministic output in get_conn() when we have to decide a default connection and no bootdev was specified on the command line. Also add an array that stores the original order in which interfaces appear in the command line, and use it when we have to loop through connections. The return value of nmi_cmdline_reader_parse() is still a hash table because once we have generated connections, their order doesn't matter.
4 daysinitrd: fix indentation in iBFT readerBeniamino Galvani1-2/+2
4 daysinitrd: generate ipv6.method=ignore connection with ip=dhcpBeniamino Galvani2-3/+3
The legacy network module used to leave kernel IPv6 autoconfiguration enabled with ip=dhcp. Do the same for backwards compatibility. https://github.com/dracutdevs/dracut/issues/700
4 daysinitrd: don't add empty connection if iBFT parsing failsBeniamino Galvani1-6/+8
Don't add an empty connection to the list if nmi_ibft_update_connection_from_nic() fails when reading iBFT information. If the function fails in parse_ip(), continue with the existing connection built from other command line options. Also, fix a memory leak.
4 daysovs: merge branch 'bg/ovs-interface-mtu-rh1808124'Beniamino Galvani5-20/+130
https://bugzilla.redhat.com/show_bug.cgi?id=1807726 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/433
4 daysovs: set the MTU in ovsdb when changing platform MTU of ovs-interfaceBeniamino Galvani3-4/+54
If we change the the MTU of an ovs interface only through netlink, the change could be overridden by ovs-vswitchd at any time when other interfaces change. Set the MTU also in the ovsdb to prevent such changes. Note that if the MTU comes from the connection, we already set the ovsdb MTU at creation time and so this other update becomes useless. But it is needed when changing the MTU at runtime (reapply) or when the MTU comes from a different source (e.g. DHCP).
4 daysovs: set MTU from connection when creating an internal interfaceBeniamino Galvani1-0/+12
The ovs-vswitchd.conf.db(5) man page says about the the mtu_request column in the Interface table: "Requested MTU (Maximum Transmission Unit) for the interface. A client can fill this column to change the MTU of an interface [...] If this is not set and if the interface has internal type, Open vSwitch will change the MTU to match the minimum of the other interfaces in the bridge." Therefore, if the connection specifies a MTU, set it early when adding the interface to the ovsdb so that it will not be changed to the minimum of other interfaces.
4 daysovs/ovsdb: support changing the MTU of an ovs interfaceBeniamino Galvani2-16/+64
Introduce a nm_ovsdb_set_interface_mtu() function to update the MTU of an ovs interface in the ovsdb.
4 daysmerge: branch 'bg/ipv6-addresses-order-rh1814557'Beniamino Galvani8-50/+88
https://bugzilla.redhat.com/show_bug.cgi?id=1814557
4 daysplatform: improve IPv6 address synchronizationBeniamino Galvani1-32/+63
When we must synchronize IPv6 addresses, we compare the order of addresses to set with what is currently set on platform. Starting from addresses with lower priority, when a mismatch is found we remove it from platform and also remove all following addresses, so that we can re-add them in the right order. Since kernel keeps addresses internally sorted by scope, we should consider each scope separately in order to avoid unnecessary address deletions. For example, if we want to configure addresses fe80::1/64,2000::1/64 and we currently have on platform 2000::1/64, it's not necessary to remove the existing address; we can just add the link-local one. Co-authored-by: Thomas Haller <thaller@redhat.com> https://bugzilla.redhat.com/show_bug.cgi?id=1814557
4 daysplatform: sort IPv6 addresses from platform during syncBeniamino Galvani1-3/+8
There is no guarantee that addresses returned from the cache are in scope-priority order. Sort them.
4 daystests: replace NMTST_SWAP() by new NM_SWAP() macroThomas Haller6-19/+10
NMTST_SWAP() used memcpy() for copying the value, while NM_SWAP() uses a temporary variable with typeof(). I think the latter is preferable. Also, the macro is essentially doing the same thing.
4 daysshared: add NM_SWAP() macroThomas Haller1-0/+11
5 daysbuild/meson: fix build by link nm-dispatcher with libnm-glib-aux.laThomas Haller1-0/+1
Fixes: a34b1f793e18 ('build: link nm-dispatcher with libnm-glib-aux.la')
5 daysdispatcher: use nm_str_hash() for hash table in dispatcherThomas Haller1-1/+1
nm_str_hash() uses siphash24. We want to use that everywhere. The only concern would be that it is slower. But if that's the concern, then we would have many more performance critical places to care about first.
5 daysbuild: link nm-dispatcher with libnm-glib-aux.laThomas Haller1-0/+3
Our glib based code should also include our static utility library libnm-glib-aux. This is our basic utility library that we want to have around everywhere. Since we link statically, the linker will weed out the unused stuff at compile time. So, there is no overhead, except for the things that we actually use.
5 daysrdisc: avoid static variable in receive_ra()Thomas Haller1-1/+1
It's unnecessary and makes the function unnecessarily not thread safe. Of course, also ndp_msg_opt_route_prefix() uses static variables, so it's still not thread safe. Fixes: c3a4656a68f9 ('rdisc: libndp implementation')
5 daysrdisc: fix parsing ndp_msg_opt_dnssl_lifetime() from IPv6 RAThomas Haller1-1/+1
Fixes: c3a4656a68f9 ('rdisc: libndp implementation')
6 dayscore: merge branch 'af/settings-add-matches' (part 1)Thomas Haller3-1/+61
https://gitlab.freedesktop.org/afreof/NetworkManager/-/tree/af/settings-add-matches
6 daysutils: use nm_utils_strsplit_set_full() in nm_utils_proc_cmdline_split()Thomas Haller1-5/+13
We should handle kernel command line like systemd does, with its ConditionKernelCommandLine= setting. For example, it tokenizes words between various white space characters, not only space. Use nm_utils_strsplit_set_full() for that. Note that we currently don't yet have a tokenizer that supports quotation, like systemd does. We should extend nm_utils_strsplit_set_full() for that.
6 daysshared: add NM_ASCII_WHITESPACES macroThomas Haller1-1/+6
NM_ASCII_SPACES contains the ASCII characters according to g_ascii_isspace(). Add NM_ASCII_WHITESPACES which differs from NM_ASCII_SPACES by not including "\f". In some cases, that character shall be excluded. For example, this is what systemd uses as "WHITESPACE" define at various places. Also, reorder the spaces string so that plain space comes first. It is expected that ' ' is much more frequently than newlines or tabs. While the order here shouldn't matter, it seems preferably to order frequent characters in front.
6 daysnm-core-utils: add nm_utils_proc_cmdlineAdrian Freihofer2-0/+47
Add a new function to read /proc/cmdline. The function caches the content.
6 dayspo: update Ukrainian (uk) translationYuri Chornoivan1-1712/+1846
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/448
7 daysAdd domain_match mode for wifi certificate domain comparisonNiklas Goerke11-3/+149
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/308 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/437
7 dayssystemd: merge branch systemd into masterThomas Haller41-585/+1216
7 dayssystemd: update code from upstream (2020-03-23)systemdThomas Haller39-581/+1206
This is a direct dump from systemd git. ====== SYSTEMD_DIR=../systemd COMMIT=cdc6c95737d26b1746b446dfe662872d593d23c6 ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files -z :/src/systemd/src/ \ :/shared/systemd/src/ \ :/shared/nm-std-aux/unaligned.h | \ xargs -0 rm -f nm_copy_sd_shared() { mkdir -p "./shared/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./shared/systemd/$1" } nm_copy_sd_core() { mkdir -p "./src/systemd/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/systemd/$1" } nm_copy_sd_stdaux() { mkdir -p "./shared/nm-std-aux/" cp "$SYSTEMD_DIR/$1" "./shared/nm-std-aux/${1##*/}" } nm_copy_sd_core "src/libsystemd-network/arp-util.c" nm_copy_sd_core "src/libsystemd-network/arp-util.h" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.c" nm_copy_sd_core "src/libsystemd-network/dhcp-identifier.h" nm_copy_sd_core "src/libsystemd-network/dhcp-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp-packet.c" nm_copy_sd_core "src/libsystemd-network/dhcp-protocol.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-lease-internal.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-network.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-option.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd_core "src/libsystemd-network/lldp-internal.h" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.c" nm_copy_sd_core "src/libsystemd-network/lldp-neighbor.h" nm_copy_sd_core "src/libsystemd-network/lldp-network.c" nm_copy_sd_core "src/libsystemd-network/lldp-network.h" nm_copy_sd_core "src/libsystemd-network/network-internal.c" nm_copy_sd_core "src/libsystemd-network/network-internal.h" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-client.c" nm_copy_sd_core "src/libsystemd-network/sd-dhcp6-lease.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4acd.c" nm_copy_sd_core "src/libsystemd-network/sd-ipv4ll.c" nm_copy_sd_core "src/libsystemd-network/sd-lldp.c" nm_copy_sd_core "src/libsystemd/sd-event/event-source.h" nm_copy_sd_core "src/libsystemd/sd-event/event-util.c" nm_copy_sd_core "src/libsystemd/sd-event/event-util.h" nm_copy_sd_core "src/libsystemd/sd-event/sd-event.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.c" nm_copy_sd_core "src/libsystemd/sd-id128/id128-util.h" nm_copy_sd_core "src/libsystemd/sd-id128/sd-id128.c" nm_copy_sd_core "src/systemd/_sd-common.h" nm_copy_sd_core "src/systemd/sd-dhcp-client.h" nm_copy_sd_core "src/systemd/sd-dhcp-lease.h" nm_copy_sd_core "src/systemd/sd-dhcp-option.h" nm_copy_sd_core "src/systemd/sd-dhcp6-client.h" nm_copy_sd_core "src/systemd/sd-dhcp6-lease.h" nm_copy_sd_core "src/systemd/sd-event.h" nm_copy_sd_core "src/systemd/sd-id128.h" nm_copy_sd_core "src/systemd/sd-ipv4acd.h" nm_copy_sd_core "src/systemd/sd-ipv4ll.h" nm_copy_sd_core "src/systemd/sd-lldp.h" nm_copy_sd_core "src/systemd/sd-ndisc.h" nm_copy_sd_shared "src/basic/alloc-util.c" nm_copy_sd_shared "src/basic/alloc-util.h" nm_copy_sd_shared "src/basic/async.h" nm_copy_sd_shared "src/basic/cgroup-util.h" nm_copy_sd_shared "src/basic/env-file.c" nm_copy_sd_shared "src/basic/env-file.h" nm_copy_sd_shared "src/basic/env-util.c" nm_copy_sd_shared "src/basic/env-util.h" nm_copy_sd_shared "src/basic/errno-util.h" nm_copy_sd_shared "src/basic/escape.c" nm_copy_sd_shared "src/basic/escape.h" nm_copy_sd_shared "src/basic/ether-addr-util.c" nm_copy_sd_shared "src/basic/ether-addr-util.h" nm_copy_sd_shared "src/basic/extract-word.c" nm_copy_sd_shared "src/basic/extract-word.h" nm_copy_sd_shared "src/basic/fd-util.c" nm_copy_sd_shared "src/basic/fd-util.h" nm_copy_sd_shared "src/basic/fileio.c" nm_copy_sd_shared "src/basic/fileio.h" nm_copy_sd_shared "src/basic/format-util.c" nm_copy_sd_shared "src/basic/format-util.h" nm_copy_sd_shared "src/basic/fs-util.c" nm_copy_sd_shared "src/basic/fs-util.h" nm_copy_sd_shared "src/basic/hash-funcs.c" nm_copy_sd_shared "src/basic/hash-funcs.h" nm_copy_sd_shared "src/basic/hashmap.c" nm_copy_sd_shared "src/basic/hashmap.h" nm_copy_sd_shared "src/basic/hexdecoct.c" nm_copy_sd_shared "src/basic/hexdecoct.h" nm_copy_sd_shared "src/basic/hostname-util.c" nm_copy_sd_shared "src/basic/hostname-util.h" nm_copy_sd_shared "src/basic/in-addr-util.c" nm_copy_sd_shared "src/basic/in-addr-util.h" nm_copy_sd_shared "src/basic/io-util.c" nm_copy_sd_shared "src/basic/io-util.h" nm_copy_sd_shared "src/basic/list.h" nm_copy_sd_shared "src/basic/log.h" nm_copy_sd_shared "src/basic/macro.h" nm_copy_sd_shared "src/basic/memory-util.c" nm_copy_sd_shared "src/basic/memory-util.h" nm_copy_sd_shared "src/basic/mempool.c" nm_copy_sd_shared "src/basic/mempool.h" nm_copy_sd_shared "src/basic/missing_fcntl.h" nm_copy_sd_shared "src/basic/missing_random.h" nm_copy_sd_shared "src/basic/missing_socket.h" nm_copy_sd_shared "src/basic/missing_stat.h" nm_copy_sd_shared "src/basic/missing_syscall.h" nm_copy_sd_shared "src/basic/missing_type.h" nm_copy_sd_shared "src/basic/parse-util.c" nm_copy_sd_shared "src/basic/parse-util.h" nm_copy_sd_shared "src/basic/path-util.c" nm_copy_sd_shared "src/basic/path-util.h" nm_copy_sd_shared "src/basic/prioq.c" nm_copy_sd_shared "src/basic/prioq.h" nm_copy_sd_shared "src/basic/process-util.c" nm_copy_sd_shared "src/basic/process-util.h" nm_copy_sd_shared "src/basic/random-util.c" nm_copy_sd_shared "src/basic/random-util.h" nm_copy_sd_shared "src/basic/set.h" nm_copy_sd_shared "src/basic/signal-util.c" nm_copy_sd_shared "src/basic/signal-util.h" nm_copy_sd_shared "src/basic/siphash24.h" nm_copy_sd_shared "src/basic/socket-util.c" nm_copy_sd_shared "src/basic/socket-util.h" nm_copy_sd_shared "src/basic/sort-util.h" nm_copy_sd_shared "src/basic/sparse-endian.h" nm_copy_sd_shared "src/basic/stat-util.c" nm_copy_sd_shared "src/basic/stat-util.h" nm_copy_sd_shared "src/basic/stdio-util.h" nm_copy_sd_shared "src/basic/string-table.c" nm_copy_sd_shared "src/basic/string-table.h" nm_copy_sd_shared "src/basic/string-util.c" nm_copy_sd_shared "src/basic/string-util.h" nm_copy_sd_shared "src/basic/strv.c" nm_copy_sd_shared "src/basic/strv.h" nm_copy_sd_shared "src/basic/strxcpyx.c" nm_copy_sd_shared "src/basic/strxcpyx.h" nm_copy_sd_shared "src/basic/time-util.c" nm_copy_sd_shared "src/basic/time-util.h" nm_copy_sd_shared "src/basic/tmpfile-util.c" nm_copy_sd_shared "src/basic/tmpfile-util.h" nm_copy_sd_shared "src/basic/umask-util.h" nm_copy_sd_shared "src/basic/user-util.h" nm_copy_sd_shared "src/basic/utf8.c" nm_copy_sd_shared "src/basic/utf8.h" nm_copy_sd_shared "src/basic/util.c" nm_copy_sd_shared "src/basic/util.h" nm_copy_sd_shared "src/shared/dns-domain.c" nm_copy_sd_shared "src/shared/dns-domain.h" nm_copy_sd_stdaux "src/basic/unaligned.h"
7 dayscore: avoid assertion failure in _settings_connection_flags_changed() ↵Thomas Haller1-7/+12
without device It seems not unexpected, that we get a flags-changed notification while having no device. Handle it gracefully and avoid the assertion failure. #0 _g_log_abort (breakpoint=breakpoint@entry=1) at gmessages.c:583 #1 g_logv (log_domain=0x55f3c86f0262 "NetworkManager", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffcbf88f1c0) at gmessages.c:1391 #2 g_log (log_domain=log_domain@entry=0x55f3c86f0262 "NetworkManager", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f21e99adb27 "%s: assertion '%s' failed") at gmessages.c:1432 #3 g_return_if_fail_warning (log_domain=log_domain@entry=0x55f3c86f0262 "NetworkManager", pretty_function=pretty_function@entry=0x55f3c875f290 <__func__.53083> "nm_device_reapply", expression=expression@entry=0x55f3c8752507 "NM_IS_DEVICE (self)") at gmessages.c:2809 #4 nm_device_reapply (self=0x0, connection=connection@entry=0x55f3caab4e60, error=error@entry=0x7ffcbf88f308) at src/devices/nm-device.c:12107 #5 _settings_connection_flags_changed (settings_connection=<optimized out>, self=0x55f3caabca70 [NMActRequest]) at src/nm-active-connection.c:960 #9 <emit signal ??? on instance 0x55f3caaaf530 [NMSettingsConnection]> (instance=instance@entry=0x55f3caaaf530, signal_id=<optimized out>, detail=detail@entry=0) at gsignal.c:3447 #6 g_closure_invoke (closure=0x55f3caa4c160, return_value=return_value@entry=0x0, n_param_values=1, param_values=param_values@entry=0x7ffcbf88f520, invocation_hint=invocation_hint@entry=0x7ffcbf88f4c0) at gclosure.c:804 #7 signal_emit_unlocked_R (node=node@entry=0x55f3ca9dcf90, detail=detail@entry=0, instance=instance@entry=0x55f3caaaf530, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7ffcbf88f520) at gsignal.c:3635 #8 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7ffcbf88f6a0) at gsignal.c:3391 #10 nm_settings_connection_set_flags_full (self=self@entry=0x55f3caaaf530 [NMSettingsConnection], mask=<optimized out>, value=<optimized out>) at src/settings/nm-settings-connection.c:2025 #11 _connection_changed_process_all_dirty (update_reason=(NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_SYSTEM_SECRETS | NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_AGENT_SECRETS), sett_mask=<optimized out>, sett_flags=<optimized out>, connection=0x55f3caab4f80, sett_conn_entry=<optimized out>, self=0x55f3ca99c000 [NMSettings]) at src/settings/nm-settings.c:1099 #12 _connection_changed_process_all_dirty (update_reason=(NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_SYSTEM_SECRETS | NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_AGENT_SECRETS), override_sett_flags=1, sett_mask=_NM_SETTINGS_CONNECTION_INT_FLAGS_PERSISTENT_MASK, sett_flags=<optimized out>, allow_add_to_no_auto_default=0, sett_conn_entry=<optimized out>, self=0x55f3ca99c000 [NMSettings]) at src/settings/nm-settings.c:1284 #13 _connection_changed_process_all_dirty (self=self@entry=0x55f3ca99c000 [NMSettings], allow_add_to_no_auto_default=allow_add_to_no_auto_default@entry=0, sett_flags=sett_flags@entry=NM_SETTINGS_CONNECTION_INT_FLAGS_NONE, sett_mask=sett_mask@entry=NM_SETTINGS_CONNECTION_INT_FLAGS_NONE, override_sett_flags=override_sett_flags@entry=1, update_reason=update_reason@entry=(NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_SYSTEM_SECRETS | NM_SETTINGS_CONNECTION_UPDATE_REASON_RESET_AGENT_SECRETS)) at src/settings/nm-settings.c:1304 #14 _plugin_connections_reload (self=self@entry=0x55f3ca99c000 [NMSettings]) at src/settings/nm-settings.c:1417 #15 impl_settings_reload_connections (obj=0x55f3ca99c000 [NMSettings], interface_info=<optimized out>, method_info=<optimized out>, connection=<optimized out>, sender=<optimized out>, invocation=0x7f21d000c100 [GDBusMethodInvocation], parameters=0x55f3ca9e1f20) at src/settings/nm-settings.c:2822 ... https://bugzilla.redhat.com/show_bug.cgi?id=1816067
7 daysclients/tests: comment return code by signal in test outputThomas Haller1-1/+43
Otherwise, we just see "returncode: -11", which isn't very clear. By default, our test nmcli invocations should never exit by a signal. Usually, when we encounter a signal, it indicates to a bug and a crash during the test. Print more information about the exit code. returncode: -11 (SIGNAL SIGSEGV)
7 dayscli: merge branch 'bg/cli-remove-setting'Beniamino Galvani9-42/+145
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/440
7 dayscli: support setting removalBeniamino Galvani4-36/+138
7 dayslibnm-core: slightly improve sriov setting documentationBeniamino Galvani2-2/+3
7 dayslibnm-core: remove trailing dot from setting descriptionBeniamino Galvani4-4/+4
The trailing dot is already added when generating the man page.
7 daysall: use nm_clear_pointer() instead of g_clear_pointer()Thomas Haller46-90/+90
g_clear_pointer() would always cast the destroy notify function pointer to GDestroyNotify. That means, it lost some type safety, like GPtrArray *ptr_arr = ... g_clear_pointer (&ptr_arr, g_array_unref); Since glib 2.58 ([1]), g_clear_pointer() is also more type safe. But this is not used by NetworkManager, because we don't set GLIB_VERSION_MIN_REQUIRED to 2.58. [1] https://gitlab.gnome.org/GNOME/glib/-/commit/f9a9902aac826ab4aecc25f6eb533a418a4fa559 We have nm_clear_pointer() to avoid this issue for a long time (pre 1.12.0). Possibly we should redefine in our source tree g_clear_pointer() as nm_clear_pointer(). However, I don't like to patch glib functions with our own variant. Arguably, we do patch g_clear_error() in such a manner. But there the point is to make the function inlinable. Also, nm_clear_pointer() returns a boolean that indicates whether anything was cleared. That is sometimes useful. I think we should just consistently use nm_clear_pointer() instead, which does always the preferable thing. Replace: sed 's/\<g_clear_pointer *(\([^;]*\), *\([a-z_A-Z0-9]\+\) *)/nm_clear_pointer (\1, \2)/g' $(git grep -l g_clear_pointer) -i
7 daysall: use nm_clear_g_free() instead of g_clear_pointer()Thomas Haller44-123/+123
I think it's preferable to use nm_clear_g_free() instead of g_clear_pointer(, g_free). The reasons are not very strong, but I think it is overall preferable to have a shorthand for this frequently used functionality. sed 's/\<g_clear_pointer *(\([^;]*\), *\(g_free\) *)/nm_clear_g_free (\1)/g' $(git grep -l g_clear_pointer) -i
7 dayslibnm: merge branch 'th/libnm-dbus-async-calls'Thomas Haller36-118/+394
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/439
7 dayslibnm: enable macros for marking sync libnm methods as deprecatedThomas Haller1-4/+5
7 dayslibnm: drop unused codeThomas Haller1-6/+0
7 dayscli: use async method D-Bus for `nmcli radio wifi on|off`Thomas Haller1-1/+27
Showcase nm_client_dbus_set_property(). Thereby, also print error messages and return an error if the command fails. Also, enable PolicyKit authentication (although, I think there are some bugs with this still).