summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-21tools: nm-in-vm: fix error if pool folder doesn't exist yetih/nm-in-vmÍñigo Huguet1-0/+1
If libvirt's default pool folder doesn't exist yet (i.e. the user has never installed a VM there), create it to avoid error and script exit.
2023-09-21tools: nm-in-vm: fix motdÍñigo Huguet4-8/+10
Message of the day was shown twice because the same bashrc.my file than for containers was used. That file contained some code to show motd in the container, where it is not shown by default. But in the VM, the motd is shown by default, so it was shown twice. Move the code to show motd to a file used only by nm-in-container and not by nm-in-vm. Also, modify the explanation about using prepare-for-system.sh because it's only valid for Fedora but nm-in-vm can be used with other SOs too.
2023-09-21tools: nm-in-vm: don't allow invalid hostnames, fix regexÍñigo Huguet1-4/+9
The $VM name is used also as hostname in the guest so ssh connection can be made to root@$VM. However, valid hostnames can only contain letters, numbers and '-'. If other characters are used, they are removed from the hostname so you cannot connect to root@$VM. Fix it by not allowing invalid hostnames in $VM at VM creation. Also, fix some incorrect bash regexes.
2023-09-21tools: nm-in-vm: fix CentOS Stream guestÍñigo Huguet1-2/+23
Install missing repositories required to install all the packages. Unluckily, it doesn't support 9P filesystem shares, and virtiofs is not supported for non-root hosts. Emit a warning about that.
2023-09-21tools: nm-in-vm: change default image sizeÍñigo Huguet1-3/+9
Images of qcow2 format dynamically grow up to the maximum size that they have been configured at creation time. Because of this, higher size can be selected without wasting unnecesary space in the host. Rise image size to 20G. Also, allow to set an empty value to IMAGE_SIZE, and don't resize in that case. This is useful because virt-resize fails with some guest partition layouts (like with ubuntu-20.04).
2023-09-21tools: nm-in-vm add convenience options --vm and os_versionÍñigo Huguet1-17/+30
Using more than one VM can be a quite common use case. Insteado of having to do VM=vm_name ./nm-in-vm, allow the more common way of passing options ./nm-in-vm --vm vm_name. Also, in build command, accept one positional argument to set OS_VERSION.
2023-09-21tools: nm-in-vm: Debian/Ubuntu with extra pkgs and fixed installationÍñigo Huguet2-5/+39
2023-09-21tools: nm-in-vm: fix connectivity with hostÍñigo Huguet4-1/+28
The connectivity with the host depends on getting a DHCP lease from the host. With the latest commit's customizations, the virtual NIC is not managed by NM so it is not configured. Keep it unmanaged so debuging NetworkManager doesn't affect to this virtual NIC. Use dhclient to get a DHCP lease from the host. Assign a fixed interface name (host_net) to match it from NM and dhclient config files.
2023-09-21tools: nm-in-vm: add NM custom files, packages and configsÍñigo Huguet2-10/+89
Same packages and customizations than in nm-in-container. Packages for Debian/Ubuntu pending of being added because they have different names.
2023-09-21tools: nm-in-container: don't generate files from the scriptÍñigo Huguet15-211/+265
The script was generating the data-* files that later copies to the container. In order to the files being reusable for nm-in-vm, put them as separate files inside the data directory. However, some of the files need the full path to NetworkManager project, which varies for each user. Instead, make a sed replacement on them and generate the actual files that will be copied. Replacement: {{BASEDIR_NM}} -> $BASEDIR_NM Also, rename the files to more descriptive names, using some prefixes that give a hint of where those files will be put, and the .in extension to indicate that they will be processed.
2023-09-21tools: nm-in-container: move data to a common path for nm-in-vmÍñigo Huguet9-11/+12
nm-in-vm can use the same generated files than nm-in-container, so let's move them to a place common for both: tools/nm-guest-data. With this change, it is not worth it to have the nm-in-container directory, so move the script to tools and delete the subdirectory.
2023-09-21tools: add nm-in-vm scriptÍñigo Huguet1-0/+280
Script to download, configure and install a virtual machine to build and test NetworkManager. This is useful because there are some things that doesn't work properly on containers so a VM is needed to test. It works almost the same way than nm-in-container. Configurations specific to NetworkManager such as installing the required packages are not implemented yet.
2023-09-21man: keyfile: improve explanation of the format and routes propertiesÍñigo Huguet3-11/+58
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1722
2023-09-21man: keyfile: complete the explanation of routes propertiesih/keyfile-routes-docÍñigo Huguet2-0/+38
Complete the explanations of routes properties, adding explanations for routesN_option and routing-rules.
2023-09-21man: keyfile: improve explanation of the formatÍñigo Huguet1-11/+20
Separate the explanation of the format in various paragraphs so it is better structured and easier to follow and understand. Add a note about the properties that, instead of using a semicolon separated list, use individual key-value pairs per list element (addresses, routes and routing-rules), since this is also a relevant difference from the standard key file format and from the settings specification format.
2023-09-17device: do not set dependency failed for port if master is reconnectingWen Liang1-3/+9
When a master is re-enslaved, it will be deactivated and reconnecting immediately, as a result, we should not set the dependency-failed for its port. Otherwise, we may risk blocking the autoconnect of port connections with higher autoconnect-priority. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1725 https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1473
2023-09-13contrib: add libpsl-dev to debian requirementsih/deb_reqÍñigo Huguet2-2/+3
It's installed for Fedora and Alpine, and building with meson requires it by default. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1723
2023-09-13wifi: fix code formatBeniamino Galvani1-1/+4
Fixes: 04edba879de2 ('core: use nm_strerror_native() instead of strerror()')
2023-09-12merge: branch 'th/strerror_r'Beniamino Galvani7-29/+54
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1715
2023-09-12daemon-helper: use _nm_strerror_r() to avoid non-thread-safe strerror()Thomas Haller1-2/+5
Yes, there probably are not multiple threads here. It's a matter of principle to not use smelly functions. Also, copy the "errno" value we want to print, before calling various functions.
2023-09-12std-aux: extract and add _nm_strerror_r() helperThomas Haller3-19/+46
We have nm_strerror_native_r(), which is the wrapper around strerror_r() that we want to use in glib components (it also will ensure that the string is valid UTF-8). However, it's not usable from non-glib components. Move the part that abstracts strerror_r() out to libnm-std-aux as _nm_strerror_r(). The purpose is that non-glib componenent can use the thread-safe wrapper around strerror_r().
2023-09-12systemd: drop strerror() define from sd adapterThomas Haller1-5/+0
Systemd does not use strerror(), so this define was unused. Even if it would use it, we would better patch the upstream sources, as strerror() is not suitable in multi-threadded applications.
2023-09-12core: use nm_strerror_native() instead of strerror()Thomas Haller2-3/+3
strerror() is not thread-safe. We avoid non-thread-safe API and have instead our own wrapper nm_strerror_native(). Use it.
2023-09-12merge: branch 'ih/tunnel_mode_doc'Beniamino Galvani3-9/+39
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1719
2023-09-12nm-settings-nmcli: show proper valid values of ip-tunnel propertiesih/tunnel_mode_docÍñigo Huguet3-9/+39
Show all valid properties for ip-tunnel.mode, not only 2 examples. Show constants as values suitable for user input in nmcli. That means showing, for example, "ipip (1)" instead of "IP_TUNNEL_MODE_IPIP (1)".
2023-09-06release: bump version to 1.45.2 (development)1.45.2-devBeniamino Galvani2-2/+2
2023-09-05test-client: fix python2 f-string and format compatibility issuewl/python2_f_string_fixWen Liang1-2/+2
f-string is not supported in python2, and the autotool build complains about it as follows: ``` LIBTOOL="/bin/sh ./libtool" "../src/tests/client/test-client.sh" "." ".." "python2" -- TestNmCloudSetup File "/builds/NetworkManager/NetworkManager/src/tests/client/test-client.py", line 722 return f"{major}.{minor}.{micro}" ^ SyntaxError: invalid syntax test-client.py failed!! make[3]: *** [check-local-tests-client] Error 1 File "/builds/NetworkManager/NetworkManager/src/tests/client/test-client.py", line 722 return f"{major}.{minor}.{micro}" ^ SyntaxError: invalid syntax test-client.py failed!! ``` Also, python2 complains about extra comma during argument unpacking. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1718
2023-09-04merge: branch 'bg/l3cfg-fixes'Beniamino Galvani1-7/+6
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1712
2023-09-04l3cfg: remove tna_dirty memberBeniamino Galvani1-1/+0
The member is no longer used. Fixes: 1feaf427d2bc ('platform: rework handling of failed routes during nm_platform_ip_route_sync()')
2023-09-04l3cfg: fix typo in variable nameBeniamino Galvani1-5/+5
Replace "mesc" with "msec". Fixes: 1feaf427d2bc ('platform: rework handling of failed routes during nm_platform_ip_route_sync()')
2023-09-04l3cfg: fix log messageBeniamino Galvani1-1/+1
nm_utils_addr_family_to_char() requires a valid address family. Fixes: 1feaf427d2bc ('platform: rework handling of failed routes during nm_platform_ip_route_sync()')
2023-08-30man: update default carrier-wait-timeout in NetworkManager.confFernando Fernandez Mancera1-1/+1
The default value was updated to 6 seconds in 156344b8beec88b68f335fe13c5db91d62fcb3fc.
2023-08-29checkpoint: Fix segfault crash when rollbackGris Ge1-10/+13
When rolling back a checkpoint, NM will crash due to dereference a NULL pointer of `priv->removed_devices->len`. To fix it, we just place a NULL check before that code block. Fixes: 1f1b71ad9f8a ('checkpoint: preserve devices that were removed and readded') Reference: https://issues.redhat.com/browse/RHEL-1526 Signed-off-by: Gris Ge <fge@redhat.com>
2023-08-23manager: merge branch 'wl/device_auth_request_fix'Fernando Fernandez Mancera2-9/+23
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1716
2023-08-22nm-manager: ensure device is exported on D-Bus in authentication requestwl/device_auth_request_fixWen Liang1-0/+15
The device authentication request is an async process, it can not know the answer right away, it is not guarantee that device is still exported on D-Bus when authentication finishes. Thus, do not return SUCCESS and abort the authentication request when device is not alive. https://bugzilla.redhat.com/show_bug.cgi?id=2210271
2023-08-22Revert "nm-policy: stop rechecking autoactivation if device is unregistered"Wen Liang1-9/+8
When we register the auto-activate, the device has to be registered in NMPolicy, the assertion is correct and ensure that. This reverts commit 712729f6523f2e41a6c78e9a4f4d36a17d9464bd.
2023-08-22libnm: chain up "constructed() method in NMAuthSubjectThomas Haller1-0/+2
It's not strictly necessary, because GObject.constructed() is intentionally a NOP, to optionally allow chaining the parent method. However, for consistency, this is what we commonly do.
2023-08-17nm-policy: stop rechecking autoactivation if device is unregisteredWen Liang1-8/+9
If the device is no longer registered to NMPolicy, `g_signal_handler_find()` can not find the signal handler that was disconnected before, therefore, there is no need to schedule a check for autoactivation. https://bugzilla.redhat.com/show_bug.cgi?id=2210271 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1711
2023-08-14l3cfg: merge branch 'bg/dad-failure-log-rh2123212'Fernando Fernandez Mancera3-8/+21
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1710
2023-08-11l3cfg: demote logging level for ACD conflict messagesbg/dad-failure-log-rh2123212Beniamino Galvani1-2/+2
NMDevice is now emitting those logs at info level.
2023-08-11device: log ACD conflictsBeniamino Galvani1-0/+14
l3cfg emits a log for ACD conflicts. However, l3cfg is not aware of what are the related NMDevice or the currently active connection, and so it can't log the proper metadata fields (NM_DEVICE and NM_CONNECTION) to the journal. Instead, let NMDevice log about ACD collisions; in this way, it is possible to get the message when filtering by device and connection. For example: $ journalctl -e NM_CONNECTION=d1df47be-721f-472d-a1bf-51815ac7ec3d + NM_DEVICE=veth0 <info> device (veth0): IP address 172.25.42.1 cannot be configured because it is already in use in the network by host 00:99:88:77:66:55 <info> device (veth0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed') <warn> device (veth0): Activation: failed for connection 'veth0+'
2023-08-11l3cfg: return the conflicting MAC address with ACD eventsBeniamino Galvani2-6/+5
When a collision is detected by the Address Conflict Detection mechanism, store the conflicting MAC address in NML3AcdAddrInfo, so that it is available to listeners of NML3Cfg for events of type NM_L3_CONFIG_NOTIFY_TYPE_ACD_EVENT.
2023-08-10contrib/rpm: enable ifcfg migration on Fedora 39+bg/rpm-migrate-ifcfgBeniamino Galvani1-0/+12
https://fedoraproject.org/wiki/Changes/MigrateIfcfgToKeyfile
2023-08-09release: bump version to 1.45.1 (development)1.45.1-devBeniamino Galvani38-453/+757
2023-08-09release: bump version to 1.44.01.44.0Beniamino Galvani2-3/+3
2023-08-09NEWS: updateFernando Fernandez Mancera1-5/+0
(cherry picked from commit a1f48355de4893aa030593f2126aaf5e74ddfb57)
2023-08-09NEWS: updateFernando Fernandez Mancera1-5/+0
2023-08-09NEWS: updateFernando Fernandez Mancera1-0/+1
(cherry picked from commit 52999c0709b12a3604354695fb7ef6752493e3a3)
2023-08-09NEWS: updateFernando Fernandez Mancera1-0/+1
2023-08-09nmcli: warn if daemon version mismatchÍñigo Huguet7-5/+81
When updating NetworkManager to a new version, normally the service is not restarted by the installer to avoid interrupting networking. However, next nmcli invocation will use the updated version, but against the older version of the daemon that is still running. Although this is suposed to work, it is advisable that nmcli and daemon's versions are the same. Emit a warning recommending restarting the daemon. Add nmcli test to check the new feature. To avoid breaking the existing tests, test-networkmanager-service now reports the same version than the running nmcli except if it's instructed to report a different one. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1703 (cherry picked from commit fb851f3294fbf8ab1243dc6fcceef5adf0a403bd)