summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: update address in nm_device_update_from_platform_link()bg/rh2168477Beniamino Galvani2023-02-201-0/+3
| | | | | | | | | | | | | | | | | | | | When a software device is deactivated, normally we schedule a idle task to unrealize the device (delete_on_deactivate). However, if a new activation is enqueued on the same device (and that implies that the new profile is compatible with the device), then the idle task is not scheduled and the device will normally transition to the different states (disconnected, prepare, config, etc.). For ovs-interfaces, we remove the db entry on disconnect and that makes the link go away; however, we don't clear the hw_addr* fields of the device struct. When the new link appears, we try to set the new cloned MAC but the stale hw_addr field indicates that it's already set. Avoid this problem by updating the address as soon as the link appears. https://bugzilla.redhat.com/show_bug.cgi?id=2168477 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1532
* gsm: merge branch 'svenschwermer:initial-eps-bearer'Thomas Haller2023-02-2011-88/+332
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1331
| * wwan: Set initial EPS bearer settingsSven Schwermer2023-02-203-0/+108
| | | | | | | | Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
| * libnm: Add initial EPS parameters to gsm settingsSven Schwermer2023-02-208-44/+158
| | | | | | | | | | | | | | | | The configure flag and APN for the initial EPS bearer are used when bringing up cellular modem connections. These settings are only relevant for LTE modems. Signed-off-by: Sven Schwermer <sven.schwermer@disruptive-technologies.com>
| * libnm: extract helper function to verify APN in "nm-setting-gsm.c"Thomas Haller2023-02-201-45/+67
|/
* dispatcher: fix constructing the IPv4 nameserver variableBeniamino Galvani2023-02-201-1/+1
| | | | | | | | | Use the value of the address instead of its pointer. Fixes: c68e148b027e ('core: extend NML3ConfigData:nameserver to track DNS as string') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1217 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1539
* dbus: merge branch 'wl/deprecate_dbus_master_prop'Wen Liang2023-02-1610-17/+157
|\ | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1205 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1514
| * dbus: deprecate the NMActiveConnection Master propertyWen Liang2023-02-167-14/+146
| | | | | | | | | | | | To embrace the inclusive language, deprecate the NMActiveConnection Master property and in favor of the NMActiveConnection Controller property.
| * nm-client: expose the method nml_dbus_property_o_notify()Wen Liang2023-02-162-1/+8
| |
| * add _NM_DEPRECATED_INCLUSIVE_LANGUAGE_1_44Wen Liang2023-02-161-2/+3
|/
* wwan/ofono: fix a couple of logic errors in update_connection_list()Ratchanan Srirattanamet2023-02-161-3/+2
| | | | | | | | | | | | - Only consider preferred context of "internet" type. There can be multiple preferred contexts of multiple types, and we care about "internet" type only. - Don't check for "internet+mms" type. It turns out that "internet+mms" isn't a thing in oFono, and is used to represent "internet" context with MMSC in the lomiri-system-setting's UI only. Fixes: 9fc72bf75dbf ('wwan/ofono: create connections based on available contexts') Bug-UBports: https://gitlab.com/ubports/development/core/packaging/network-manager/-/issues/3
* glib-aux: choose favorable reallocation sequence in nm_utils_fd_read()Thomas Haller2023-02-161-5/+9
| | | | | | | | | | Ensuring to have 1000 bytes available is not a good start. Because, if we start with an empty buffer (allocated fewer than 1000 bytes), on first call we will reserve 1000 bytes. If we then just read one byte, on the next read we would again try to reserve 1000 bytes, and already require a reallocation. In this case it is better to reserve 488+1 or 1000+1 bytes.
* examples: support older libnm without NM.SettingOvsOtherConfig in ↵Thomas Haller2023-02-161-17/+24
| | | | | | | "ovs-external-ids.py" This example script is used by our NM-ci. Make it work also with libnm versions that don't yet support NM.SettingOvsOtherConfig.
* contrib: update "configure-for-system.sh" and start buildThomas Haller2023-02-141-18/+35
| | | | | | | | "configure-for-system.sh" is supposed to be in sync with NetworkManager.spec. Update for the recent changes. Also add a make/ninja call at the end. Almost always we want to build after the configure.
* contrib/rpm: minor cleanup of "NetworkManager.spec"Thomas Haller2023-02-141-2/+2
| | | | | Reorder ppp arguments so that they make more sense and are consistent with the autotools code.
* po: update Russian (ru) translationJulia Dronova2023-02-131-3353/+3037
| | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1213
* device: preserve assume state if updating port failsbg/rh2092215Beniamino Galvani2023-02-131-0/+1
| | | | | | | | | | If we fail to update the port connection, don't forget the assume state but try again later. This helps when assuming a team connection and its ports: the ports may fail to generate a connection because teamd was not started yet; in that case we need to try again. https://bugzilla.redhat.com/show_bug.cgi?id=2092215 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1523
* systemd: merge branch systemd into mainThomas Haller2023-02-1399-1459/+2212
|\ | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1529
| * systemd: update code from upstream (2023-02-07)systemdThomas Haller2023-02-0891-1707/+2156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct dump from systemd git. $ git clean -fdx && \ git cat-file -p HEAD | sed '1,/^======$/ d' | bash - && \ git add . ====== SYSTEMD_DIR=../systemd COMMIT=9eba03c7b10fe98e0443508402b3f9804230453e ( cd "$SYSTEMD_DIR" git checkout "$COMMIT" git reset --hard git clean -fdx ) git ls-files -z :/src/libnm-systemd-core/src/ \ :/src/libnm-systemd-shared/src/ \ :/src/libnm-std-aux/unaligned-fundamental.h \ :/src/libnm-std-aux/unaligned.h | \ xargs -0 rm -f nm_copy_sd_shared() { mkdir -p "./src/libnm-systemd-shared/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-shared/$1" } nm_copy_sd_core() { mkdir -p "./src/libnm-systemd-core/$(dirname "$1")" cp "$SYSTEMD_DIR/$1" "./src/libnm-systemd-core/$1" } nm_copy_sd_stdaux() { mkdir -p "./src/libnm-std-aux/" cp "$SYSTEMD_DIR/$1" "./src/libnm-std-aux/${1##*/}" } 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/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-option.h" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.c" nm_copy_sd_core "src/libsystemd-network/dhcp6-protocol.h" nm_copy_sd_core "src/libsystemd-network/network-common.c" nm_copy_sd_core "src/libsystemd-network/network-common.h" nm_copy_sd_core "src/libsystemd-network/network-internal.h" 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/sd-device/device-util.h" 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-device.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-dhcp6-option.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-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/constants.h" nm_copy_sd_shared "src/basic/dns-def.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/glyph-util.c" nm_copy_sd_shared "src/basic/glyph-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/inotify-util.c" nm_copy_sd_shared "src/basic/inotify-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/locale-util.c" nm_copy_sd_shared "src/basic/locale-util.h" nm_copy_sd_shared "src/basic/log.h" nm_copy_sd_shared "src/basic/logarithm.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/ordered-set.c" nm_copy_sd_shared "src/basic/ordered-set.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/ratelimit.c" nm_copy_sd_shared "src/basic/ratelimit.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/fundamental/macro-fundamental.h" nm_copy_sd_shared "src/fundamental/memory-util-fundamental.h" nm_copy_sd_shared "src/fundamental/sha256.c" nm_copy_sd_shared "src/fundamental/sha256.h" nm_copy_sd_shared "src/fundamental/string-util-fundamental.c" nm_copy_sd_shared "src/fundamental/string-util-fundamental.h" nm_copy_sd_shared "src/shared/dns-domain.c" nm_copy_sd_shared "src/shared/dns-domain.h" nm_copy_sd_shared "src/shared/log-link.h" nm_copy_sd_shared "src/shared/web-util.c" nm_copy_sd_shared "src/shared/web-util.h" nm_copy_sd_stdaux "src/basic/unaligned.h" nm_copy_sd_stdaux "src/fundamental/unaligned-fundamental.h"
* | build: meson: add option to set the mobile-broadband-provider-info databaseHeiko Thiery2023-02-132-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When building network-manager in cross-compile environment meson is not able to detect the right location of the mobile-broadband-provider-info database by using the pkg-config module. By adding the option 'mobile_broadband_provider_info_database' to set the correct path to the datafile this can be solved. Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com> https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1519
* | examples: rework "python/gi/show-wifi-networks.py" exampleThomas Haller2023-02-131-90/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | - only printing the scan list is not gonna cut it. It's usually stale, and we need to request a new scan. - don't hard-code the GEnum and GFlags values that we understand. We have libnm, which provides us some meta information about the data. Use it. - Some code cleanup. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1531
* | contrib/release: fix version in import-docs hint messageThomas Haller2023-02-131-1/+6
| |
* | std-aux: suppress verbose assert message with _nm_assert_fail()Thomas Haller2023-02-132-13/+12
| | | | | | | | | | | | | | | | We also do that with g_return*() macros. These strings increase the binary size for little use. Drop them, unless we build with more asserts enabled. This affects nm_assert() messages.
* | Revert "std-aux: drop assertion and function name from assert() in release mode"Thomas Haller2023-02-131-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc defines __assert_fail as: extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); but musl as: _Noreturn void __assert_fail (const char *, const char *, int, const char *); (note the difference in the type for the line argument). This cannot be made to work, unless we would detect the used type at configure time, which seems too much effort. Drop this again. This reverts commit 1ce29e120bfc763441495bbf5620fa0751753c9c. Fixes: 1ce29e120bfc ('std-aux: drop assertion and function name from assert() in release mode')
* | libnm/tests: adjust test for glib change in 2.75.0 for assertion warningThomas Haller2023-02-112-5/+16
| | | | | | | | See-also: https://gitlab.gnome.org/GNOME/glib/-/commit/0ffe86a1f7e215e4561c3b9f1d03c3cd638ed00f
* | libnm/docs: fix gtk-doc generation for settingsThomas Haller2023-02-102-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Marking "nm-core-types.h" as to be ignored by gtk-doc, causes many files to have the wrong names: /docs/libnm/html/{NMConnection.html => libnm-NMConnection.html} /docs/libnm/html/{NMSetting.html => libnm-NMSetting.html} /docs/libnm/html/{NMSetting6Lowpan.html => libnm-NMSetting6Lowpan.html} /docs/libnm/html/{NMSetting8021x.html => libnm-NMSetting8021x.html} /docs/libnm/html/{NMSettingAdsl.html => libnm-NMSettingAdsl.html} /docs/libnm/html/{NMSettingBluetooth.html => libnm-NMSettingBluetooth.html} /docs/libnm/html/{NMSettingBond.html => libnm-NMSettingBond.html} /docs/libnm/html/{NMSettingBondPort.html => libnm-NMSettingBondPort.html} /docs/libnm/html/{NMSettingBridge.html => libnm-NMSettingBridge.html} /docs/libnm/html/{NMSettingBridgePort.html => libnm-NMSettingBridgePort.html} /docs/libnm/html/{NMSettingCdma.html => libnm-NMSettingCdma.html} /docs/libnm/html/{NMSettingConnection.html => libnm-NMSettingConnection.html} /docs/libnm/html/{NMSettingDcb.html => libnm-NMSettingDcb.html} /docs/libnm/html/{NMSettingDummy.html => libnm-NMSettingDummy.html} /docs/libnm/html/{NMSettingEthtool.html => libnm-NMSettingEthtool.html} /docs/libnm/html/{NMSettingGeneric.html => libnm-NMSettingGeneric.html} /docs/libnm/html/{NMSettingGsm.html => libnm-NMSettingGsm.html} /docs/libnm/html/{NMSettingHostname.html => libnm-NMSettingHostname.html} /docs/libnm/html/{NMSettingIP4Config.html => libnm-NMSettingIP4Config.html} /docs/libnm/html/{NMSettingIP6Config.html => libnm-NMSettingIP6Config.html} /docs/libnm/html/{NMSettingIPConfig.html => libnm-NMSettingIPConfig.html} /docs/libnm/html/{NMSettingIPTunnel.html => libnm-NMSettingIPTunnel.html} /docs/libnm/html/{NMSettingInfiniband.html => libnm-NMSettingInfiniband.html} /docs/libnm/html/{NMSettingMacsec.html => libnm-NMSettingMacsec.html} /docs/libnm/html/{NMSettingMacvlan.html => libnm-NMSettingMacvlan.html} /docs/libnm/html/{NMSettingMatch.html => libnm-NMSettingMatch.html} /docs/libnm/html/{NMSettingOlpcMesh.html => libnm-NMSettingOlpcMesh.html} /docs/libnm/html/{NMSettingOvsBridge.html => libnm-NMSettingOvsBridge.html} /docs/libnm/html/{NMSettingOvsDpdk.html => libnm-NMSettingOvsDpdk.html} /docs/libnm/html/{NMSettingOvsExternalIDs.html => libnm-NMSettingOvsExternalIDs.html} /docs/libnm/html/{NMSettingOvsInterface.html => libnm-NMSettingOvsInterface.html} /docs/libnm/html/{NMSettingOvsPatch.html => libnm-NMSettingOvsPatch.html} /docs/libnm/html/{NMSettingOvsPort.html => libnm-NMSettingOvsPort.html} /docs/libnm/html/{NMSettingPpp.html => libnm-NMSettingPpp.html} /docs/libnm/html/{NMSettingPppoe.html => libnm-NMSettingPppoe.html} /docs/libnm/html/{NMSettingProxy.html => libnm-NMSettingProxy.html} /docs/libnm/html/{NMSettingSerial.html => libnm-NMSettingSerial.html} /docs/libnm/html/{NMSettingSriov.html => libnm-NMSettingSriov.html} /docs/libnm/html/{NMSettingTCConfig.html => libnm-NMSettingTCConfig.html} /docs/libnm/html/{NMSettingTeam.html => libnm-NMSettingTeam.html} /docs/libnm/html/{NMSettingTeamPort.html => libnm-NMSettingTeamPort.html} /docs/libnm/html/{NMSettingTun.html => libnm-NMSettingTun.html} /docs/libnm/html/{NMSettingUser.html => libnm-NMSettingUser.html} /docs/libnm/html/{NMSettingVeth.html => libnm-NMSettingVeth.html} /docs/libnm/html/{NMSettingVlan.html => libnm-NMSettingVlan.html} /docs/libnm/html/{NMSettingVpn.html => libnm-NMSettingVpn.html} /docs/libnm/html/{NMSettingVrf.html => libnm-NMSettingVrf.html} /docs/libnm/html/{NMSettingVxlan.html => libnm-NMSettingVxlan.html} /docs/libnm/html/{NMSettingWifiP2P.html => libnm-NMSettingWifiP2P.html} /docs/libnm/html/{NMSettingWimax.html => libnm-NMSettingWimax.html} /docs/libnm/html/{NMSettingWireGuard.html => libnm-NMSettingWireGuard.html} /docs/libnm/html/{NMSettingWired.html => libnm-NMSettingWired.html} /docs/libnm/html/{NMSettingWireless.html => libnm-NMSettingWireless.html} /docs/libnm/html/{NMSettingWirelessSecurity.html => libnm-NMSettingWirelessSecurity.html} /docs/libnm/html/{NMSettingWpan.html => libnm-NMSettingWpan.html} /docs/libnm/html/{NMSimpleConnection.html => libnm-NMSimpleConnection.html} Revert that part of the change. Even if this regresses other problems. Fixes: 1330292d057c ('docs/libnm: fix gtkdoc-scan ignore lists')
* | contrib/rpm: fix "--enable-ppp" flag to build without pppThomas Haller2023-02-101-1/+1
| | | | | | | | | | | | [thaller@redhat.com: I introduced this bug when taking the original patch]. Fixes: 820f6f3a4a42 ('contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} version')
* | contrib/rpm: sync obsoletes_{initscripts_updown,ifcfg_rh} versionThomas Haller2023-02-101-2/+2
| | | | | | | | | | | | | | | | | | | | Initially, when we obsoleted {initscripts_updown,ifcfg_rh}, the package versions that we build from this upstream spec file differed from what we put into Fedora/RHEL. By now, this is long gone, and for upstream package builds we don't care to accurately track the version, when using upstream/copr builds. Just sync the version to what they are in Fedora/RHEL.
* | contrib/rpm: fix building without pppStewart Smith2023-02-101-0/+4
| | | | | | | | | | | | | | We need to explicitly say we don't want PPP as the default is that we do want to build with PPP. https://src.fedoraproject.org/rpms/NetworkManager/pull-request/13
* | contrib/rpm: fix flatpak buildYaakov Selkowitz2023-02-101-5/+7
| | | | | | | | https://src.fedoraproject.org/rpms/NetworkManager/pull-request/13
* | release: bump version to 1.43.2 (development)1.43.2-devThomas Haller2023-02-1031-883/+1246
|\ \
| * | NEWS: updateThomas Haller2023-02-101-2/+8
| | |
| * | contrib: accept ssh:// git url for origin in "nm-setup-git.sh"Thomas Haller2023-02-091-1/+2
| | |
| * | NEWS: updateLubomir Rintel2023-02-091-26/+23
| | | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1521
| * | logging/trivial: add code comment about logging "<level> [timestamp]"Thomas Haller2023-02-091-0/+14
| | |
| * | dispatcher: merge branch 'dylanvanassche:method-change-dispatch'Thomas Haller2023-02-085-2/+15
| |\ \ | | | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1311
| | * | man: NetworkManager-dispatcher: document reapply actionDylan Van Assche2023-02-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | NetworkManager dispatcher will now run dispatcher scripts with 'reapply' as action as well. Each time the connection is reapplied on a device, this action is triggered. Document this action in the documentation.
| | * | nm-dispatcher: dispatch on reapplyDylan Van Assche2023-02-084-2/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trigger a dispatcher event when a connection is reapplied on a NM device. Some devices such as phones have already a DHCP client running for accepting connections when they are plugged into USB to transfer data over SSH. When NetworkManager switches the connection IP method to shared, it spawns a dnsmasq process to handle DHCP and DNS for that connection. However, a dispatcher event is needed to disable the external DHCP server for these USB connections as NetworkManager's dnsmasq handles them now. Moreover, when the connection method is switched to a different mode, the external DHCP server needs to be spawned again to make sure that SSH connections are still possible to the device. To achieve this, add a new NetworkManager Dispatcher event 'reapply' which is triggered when a connection is reapplied on a NM device. This way, a dispatcher script can handle the case above by inspecting the IP method in the dispatcher script.
| * | glib-aux: drop usage of malloc_usable_size() in nm_free_secret()Thomas Haller2023-02-081-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of nm_free_secret() is to clear the secrets from memory. That surely is some layer of extra snake oil, because we tend to pass secrets via D-Bus, where the memory gets passed down to (D-Bus) libraries which have no idea to keep it private. Still... But turns out, malloc_usable_size() might not actually be usable for this. Read the discussion at [1]. Stop using malloc_usable_size(), which seems unfortunate. There is probably no secret relevant data after the NUL byte anyway, because we tend to create such strings once, and don't rewrite/truncate them afterwards (which would leave secrets behind as garbage). Note that systemd's erase_and_free() still uses malloc_usable_size() ([2]) but the macro foo to get that right is terrifying ([3]). [1] https://github.com/systemd/systemd/issues/22801#issuecomment-1343041481 [2] https://github.com/systemd/systemd/blob/11c0f0659ecd82572c2dc83f3b34493a36dcd954/src/basic/memory-util.h#L101 [3] https://github.com/systemd/systemd/commit/7929e180aa47a2692ad4f053afac2857d7198758 Fixes: d63cd26e6042 ('shared: improve nm_free_secret() to clear entire memory buffer')
| * | test-client: merge branch 'th/test-client-fixes'Thomas Haller2023-02-0821-1174/+1530
| |\ \ | | | | | | | | | | | | https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1528
| | * | test-client: re-enable test_monitor() testThomas Haller2023-02-081-5/+0
| | | | | | | | | | | | | | | | It's fixed now. See the previous commit.
| | * | test-client: fix race in test_monitor() testThomas Haller2023-02-081-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During srv_shutdown() we do p.stdin.close() p.kill() Usually, the kill wins and the service just drops off the bus: libnm-dbus[3201919]: <debug> [438617.45324] nmclient[40f7938626f3f5f0]: name owner changed: ":1.1" -> (null) libnm-dbus[3201919]: <debug> [438617.45332] nmclient[40f7938626f3f5f0]: release all at which point all objects in NMClient get destroyed and the signals get emitted in the order: libnm-dbus[3201919]: <trace> [438617.45574] nmclient[40f7938626f3f5f0]: [nmclient] emit "device-removed" signal for /org/freedesktop/NetworkManager/Devices/1 nmcli[out]: eth0: device removed libnm-dbus[3201919]: <trace> [438617.45590] nmclient[40f7938626f3f5f0]: [nmclient] emit "any-device-removed" signal for /org/freedesktop/NetworkManager/Devices/1 libnm-dbus[3201919]: <trace> [438617.45593] nmclient[40f7938626f3f5f0]: [nmclient] emit "connection-removed" signal for /org/freedesktop/NetworkManager/Settings/Connectio> nmcli[out]: con-1: connection profile removed However, sometimes the stub service notices that stdin was closed and it sends signals about shutting down: libnm-dbus[3201061]: <trace> [438226.44965] nmclient[401639659459c316]: interfaces-removed: [/org/freedesktop/NetworkManager/Settings] receive interface remove event for > libnm-dbus[3201061]: <trace> [438226.44966] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: changed-type 0x01 linked libnm-dbus[3201061]: <trace> [438226.44967] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: changed-type 0x01 consumed libnm-dbus[3201061]: <trace> [438226.44968] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: changed-type 0x02 linked libnm-dbus[3201061]: <trace> [438226.44969] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: unregister NMClient from D-Bus object libnm-dbus[3201061]: <trace> [438226.44971] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: drop D-Bus instance libnm-dbus[3201061]: <trace> [438226.44971] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager/Settings]: set D-Bus object state unlinked libnm-dbus[3201061]: <trace> [438226.44972] nmclient[401639659459c316]: [nmclient] emit "connection-removed" signal for /org/freedesktop/NetworkManager/Settings/Connectio> nmcli[out]: con-1: connection profile removed libnm-dbus[3201061]: <trace> [438226.44992] nmclient[401639659459c316]: interfaces-removed: [/org/freedesktop/NetworkManager] receive interface remove event for interface> libnm-dbus[3201061]: <trace> [438226.44994] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: changed-type 0x01 linked libnm-dbus[3201061]: <trace> [438226.44995] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: changed-type 0x01 consumed libnm-dbus[3201061]: <trace> [438226.44996] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: changed-type 0x02 linked libnm-dbus[3201061]: <trace> [438226.44998] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: unregister NMClient from D-Bus object libnm-dbus[3201061]: <trace> [438226.44999] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: drop D-Bus instance libnm-dbus[3201061]: <trace> [438226.45000] nmclient[401639659459c316]: [/org/freedesktop/NetworkManager]: set D-Bus object state unlinked libnm-dbus[3201061]: <trace> [438226.45001] nmclient[401639659459c316]: [nmclient] emit "device-removed" signal for /org/freedesktop/NetworkManager/Devices/1 nmcli[out]: eth0: device removed libnm-dbus[3201061]: <trace> [438226.45005] nmclient[401639659459c316]: [nmclient] emit "any-device-removed" signal for /org/freedesktop/NetworkManager/Devices/1 nmcli[out]: NetworkManager is stopped libnm-dbus[3201061]: <debug> [438226.45545] nmclient[401639659459c316]: name owner changed: ":1.1" -> (null) libnm-dbus[3201061]: <debug> [438226.45550] nmclient[401639659459c316]: release all The fix is to accept the events in any order.
| | * | test-client: randomly kill or close the stub test serviceThomas Haller2023-02-081-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test stub service watches stdin, and if it gets closed the service will shut down. Note that the service does not catch any signals, so sending a signal will kill the service right away. The previous code first closed stdin, and then killed the process. That can result in different outcomes on D-Bus. Usually the signal gets received first, and the test service just drops off the bus. Sometimes it notices the closing of stdin and shuts actively down. That can make a difference, especially for the test_monitor() test which runs the monitor while stopping the service. We could just always kill the stub service to get consistent behavior. However, that doesn't seem very useful. Instead, randomize the behavior to easier see how the behavior differs.
| | * | nmcli: replace all uses of g_print()/g_printerr() with ↵Thomas Haller2023-02-089-859/+885
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nmc_print()/nmc_printerr() The main purpose is to simplify printf debugging and manual testing. We can now trivially patch the code so that all output from nmcli gets (additionally) written to a file. That is useful when debugging a unit test in "test-client.py". Thereby we can duplicate all messages via nm_utils_print(), which is in sync with the debug messages from libnm and which honors LIBNM_CLIENT_DEBUG_FILE.
| | * | nmcli: add nmc_print()/nmc_printerr() macrosThomas Haller2023-02-081-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These will replace the direct calls to g_print()/g_printerr() in nmcli. There are two purposes. 1) the new macros embody the concept of "printing something from nmcli". It means, we can `git grep` for those functions, and find all the relevant places, without hitting the irrelevant ones (e.g. tests that also use g_print()). 2) by having one place, we can trivially change it. That is useful for printf debugging. For example, "test-client.py" runs nmcli and captures and compares the output. With libnm we can set LIBNM_CLIENT_DEBUG and LIBNM_CLIENT_DEBUG_FILE to print libnm debug messages to a file. But we cannot trivially synchronize the messages from nmcli with that output (also because they are consumed by the test and not immediately accessible). This would be easy, if we temporarily could patch nmc_print*() to also log to nm_utils_print(). The new macros will allow doing that at one place. For example, patch the "#if 0" and run: $ LIBNM_CLIENT_DEBUG=trace \ LIBNM_CLIENT_DEBUG_FILE='xxx.%p' \ NMTST_USE_VALGRIND=1 \ LIBTOOL="/bin/sh ./libtool" ./src/tests/client/test-client.sh -- -k monitor
| | * | nmcli/trivial: rename nmc_print() to nmc_print_table()Thomas Haller2023-02-087-135/+137
| | | | | | | | | | | | | | | | | | | | | | | | nmc_print() will be used for something else. Rename. Also, nmc_print_table() is the better name anyway because the function does a lot of formatting and not simple printf().
| | * | nmcli/trivial: rename monitor functions in internal header fileThomas Haller2023-02-085-6/+6
| | | | | | | | | | | | | | | | Identifiers in our headers should have a "nm" prefix. Rename.
| | * | test-client: pass LIBNM_CLIENT_DEBUG to nmcliThomas Haller2023-02-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For debugging libnm, LIBNM_CLIENT_DEBUG can be very useful. As the tests compare stdout/stderr from nmcli with expected output, just enabling it will break the tests. However, in combination with LIBNM_CLIENT_DEBUG_FILE this can be very useful. Preserve and pass on the environment variables, if set.
| | * | libnm: support LIBNM_CLIENT_DEBUG_FILE to print debug logging to fileThomas Haller2023-02-081-20/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With LIBNM_CLIENT_DEBUG we get debug logging for libnm, either to stdout or to stderr. "test-client.py" runs nmcli as a unit test. It thereby catches stdout and stderr. That means, LIBNM_CLIENT_DEBUG would break the tests. Now honor the LIBNM_CLIENT_DEBUG_FILE environment variable to specify a file to which the debug logs get written. The pattern "%p" is replaced by the process id. As before, nm_utils_print(0, ...) also honors this environment variable and uses the same logging destination.
| | * | test-client: cleanup importsThomas Haller2023-02-081-20/+19
| | | | | | | | | | | | | | | | | | | | | | | | Sort imports by name. Also avoid "from signal import SIGINT". I find it ugly to import names in the current namespace. "SIGINT" should be refered to by its full name, including the package/namespace.