Commit Graph

33300 Commits

Author SHA1 Message Date
Anders Jonsson
bdb2a488c3 libnm: fix typo 2024-06-19 11:06:59 +00:00
Íñigo Huguet
270285e82a merge: branch 'lr/dac-override-comment'
service: remove a misleading comment

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1963
2024-06-19 11:06:21 +00:00
Lubomir Rintel
fe65ca77d7 service: remove a misleading comment
The comment makes it sounds as if we could do without CAP_DAC_OVERRIDE
if we don't use OpenVSwitch, which is not true. At the very least it's
needed by the VPN plugins we spawn to access cert/key material from
users' homes.
2024-06-19 11:05:49 +00:00
Íñigo Huguet
3ade788716 merge: branch 'th/fedora-22-wifi-mac-addr-conf'
[th/fedora-22-wifi-mac-addr-conf] contrib/rpm: rename section in "22-wifi-mac-addr.conf"

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1936
2024-06-19 11:03:28 +00:00
Thomas Haller
439ddc5101 contrib/rpm: rename section in "22-wifi-mac-addr.conf"
For [connection*] and [device*] sections, any suffix is allowed in
the group.

However (at least for configuration snippets we ship upstream), we
want to give a suffix that matches the name of the configuration
snippet.

It seems more common to use [connection-*] instead of [connection.].
See also "examples/nm-conf.d/*.conf" and "15-carrier-timeout.conf" file
which contains a [device-15-carrier-timeout] section.

Note that this file (in Fedora) is not configuration (installed in
/usr/lib). It is thus not problematic to modify.

Fixes: ea8dbd7a6d ('contrib/rpm: add "22-wifi-mac-addr.conf" to F40+')
2024-06-19 11:02:55 +00:00
Íñigo Huguet
5b215e97b9 merge: branch 'bg/leak'
libnm-core: fix memory leak in nm_setting_to_string()

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1934
2024-06-19 11:02:20 +00:00
Beniamino Galvani
ee5f4402bf libnm-core: fix memory leak in nm_setting_to_string()
Fixes: f957ea2b34 ('core/setting: rework nm_connection_dump()')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1934
2024-06-19 11:01:46 +00:00
Íñigo Huguet
5f82c777a8 merge: branch 'bg/wifi-p2p-pending-action'
Fix pending action for WiFi P2P

Closes #1004

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1925
2024-06-19 11:01:24 +00:00
Beniamino Galvani
82032955dd wifi-p2p: consider if the device is enabled when adding pending action
If the device gets rfkill-blocked, remove the pending action
"waiting-for-supplicant", as it can prevent reaching
"startup-complete".

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1004
2024-06-19 11:01:07 +00:00
Beniamino Galvani
6a9f61122e wifi-p2p: implement get_enabled()/set_enabled()
Add function to set and report the rfkill state. For now, only print a
message; the state will be used in the next commit.
2024-06-19 11:01:07 +00:00
Beniamino Galvani
334177bdc3 wifi-p2p: don't add pending action for group interface
The group interface is only used during activation; there is no need
to add a pending action for it, because when the device is in
activating state it already delays "startup-complete" via other
pending actions.
2024-06-19 11:01:07 +00:00
Íñigo Huguet
d4204dc452 merge: branch 'jv/del-unused-logging'
core/logging: remove unused nm_logging_init_pre() function

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1902
2024-06-19 11:00:23 +00:00
Jan Vaclav
1b08fa88e1 core/logging: remove unused nm_logging_init_pre() function
This function is not being used anywhere and is triggering an alert in Coverity scans.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1902
2024-06-19 10:59:56 +00:00
Beniamino Galvani
6c5faf6054 NEWS: update for 1.50 2024-06-19 11:02:02 +02:00
Íñigo Huguet
730752bfc5 merge: branch 'ih/secret_hint_tags'
vpn: handle hint tags in the daemon

Closes #1536

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1958
2024-06-18 14:01:02 +00:00
Íñigo Huguet
18240bb72d libnmc: don't strip prefix tags from secret names
The daemon is now capable of understanding and removing these prefix
tags by itself. It is better than this is not a responsibility of the
secret agent because it requires changes in all secret agents to work
properly (see https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1536).

If the secret agent knows what these prefix tags are, it can remove them
only in the text that is displayed in the UI, but maintaining the
original string as the secret name that is returned to the daemon.

Secret agents that doesn't know what these prefix tags are won't do
anything with them, and they will also return the same string as secret
name, as expected. The only drawback is that they might display the full
string to the user, which is not a nice UX but it will at least work.

Also, allow to translate the secret name for the UI in libnmc.
2024-06-18 14:00:38 +00:00
Íñigo Huguet
0583e1f843 vpn: handle hint tags in the daemon
Commit 345bd1b187 ('libnmc: fix secrets request on 2nd stage of 2FA
authentication') and commit 27c701ebfb ('libnmc: allow user input in
ECHO mode for 2FA challenges') introduced 2 new tags that hints for the
secret agents can have as prefix.

These tags were processed (and removed) in the secret agents, not in the
daemon. This is wrong because a system with an updated VPN plugin but a
not yet updated secret agent (like nm-plasma) will fail: it won't remove
the prefix and the daemon will save the secret with the prefix, i.e.
"x-dynamic-challenge:challenge-response" instead of just
"challenge-response". Then, VPN plugins doesn't recognize it, failing the
profile's activation. This is, in fact, an API break.

Also, if the VPN connection already existed before updating NM and the
VPN plugin, the secret flags are not added to the profile (they are only
added when the profile is created or modified). This causes the user's
first time response is saved to the profile, so the activation fails the
second and next times.

See:
- https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1536
- https://gitlab.gnome.org/GNOME/NetworkManager-openvpn/-/issues/142

Anyway, in a good design the daemon should contain almost all the logic
and the clients should keep as simple as possible. Fix above's problems
by letting the daemon to receive the secret names with the prefix
already included. The daemon will strip it and will know what it means.

Note that this is done only in the functions that saves the secrets from
the data received via D-Bus. For example, nm_setting_vpn_add_secret
doesn't need to do it because this value shouldn't come from VPN
plugin's hints.
2024-06-18 14:00:38 +00:00
Íñigo Huguet
8f3b4f06bb merge: branch 'ih/triage_wf'
triage: improvements to issues workflow

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1949
2024-06-18 12:22:24 +00:00
Íñigo Huguet
cf86af6cbd Explain new issues workflow and add triage automation
Add explanation of how to indicate the new issues workflow to
MAINTAINERS.md: triage -> investigation -> devel. The different
stages are indicated using Gitlab's scoped labels (mutually exclusive).

These stages try to hightlight that the issue cannot be fixed and it's
not moving forward because more info is needed, already.  Also, add a
section to CONTRIBUTING.md highlighting the importance of helping in
the triage and investigation stages: developers often cannot fix bugs
because lack of time to investigate, but even users that doesn't know
how to fix it due to lack of knowledge of the code base can help thanks
to their knowledge on networking.

Finally, make the 'triage:issues' CI job to work again, adding some
new policies with new automations. The automation will add or remove the
labels: stale, help-needed::{triage, investigation, devel} and
unassigned.

The labels help-needed::* and unassigned will be automatically added to
all issues without an assignee. This reflects better the reality of not
having enough time to work on most of the issues unless there is some
external help.
2024-06-18 13:11:58 +02:00
Fernando Fernandez Mancera
99f22526ec merge: branch 'ff/drop_autotools_jobs'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1956
2024-05-31 16:53:50 +02:00
Fernando Fernandez Mancera
f6be3c0cb1 gitlab: move Fedora rawhide and C9S to tier 2
As discussed [1], we are using a lot of resources from freedesktop org.
Let's reduce the number of distributions tested in tier1 to just one.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1549
2024-05-31 16:53:02 +02:00
Fernando Fernandez Mancera
dda6e9515f gitlab: drop the autotools jobs
As we are dropping autotools in 1.50, we can drop the autotools jobs. It
would also help to lower the load on freedesktop pipeline.
2024-05-31 16:53:02 +02:00
Stanislas Faye
44f7dd88af merge: branch 'sf/remove-features-from-rhel10'
rpm: Disable team and ifcfg-rh only in rhel distros and rhel-10+

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1948
2024-05-31 11:34:19 +00:00
Stanislas FAYE
10d4557720 Make team obsoletes in rhel-10 only if NM-team is not enabled in the rpm 2024-05-31 11:33:58 +00:00
Stanislas FAYE
3f3472c971 Use the versions number from which packages are obsoleted directly instead of using global variables 2024-05-31 11:33:58 +00:00
Stanislas FAYE
613f16de51 rpm: Disable team and ifcfg-rh only in rhel distros and rhel-10+
Resolves: https://issues.redhat.com/browse/RHEL-32948
2024-05-31 11:33:58 +00:00
Íñigo Huguet
3bb642697a merge: branch 'ih/conf4sys_meson'
contrib: configure-for-system: use meson by default and allow specifying the build directory

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1947
2024-05-31 07:08:47 +00:00
Íñigo Huguet
714d02697f contrib: configure-for-system: use meson by default
With the deprecation of autotools, use meson by default. For the moment,
it's still possible to build with autotools passing -a/--autotools.

Additionally, as we allow to specify different build directories other
than './build', let's not asume that the user wants to overwrite it
by default. Instead, the script will asume ./build if the user doesn't
specify the build directory, but only if it doesn't exist. If it does,
the user will have to force overwritting it with `--meson ./build`.
2024-05-31 07:08:22 +00:00
Íñigo Huguet
a07627fdcc contrib: configure-for-system: specify meson build dir
Instead of forcing to use ./build directory, let's make the the user
specify what directory he wants to use. This will allow to have multiple
build directories with different configurations as meson is designed to
allow, without having to overwrite the existing build one.
2024-05-31 07:08:22 +00:00
Fernando Fernandez Mancera
bd1763ebea merge: branch 'ff/fix_install_debuginfo'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1951
2024-05-30 15:58:01 +02:00
Fernando Fernandez Mancera
a4bbdeaf54 src: fix code formatting to last clang version 2024-05-30 15:23:37 +02:00
Fernando Fernandez Mancera
4e50d7d53f gitlab: fix helper scripts to support DNF5
As Fedora 41 (currently Rawhide) is migrating to DNF5 [1], the
debuginfo-install command is not available anymore according to the
documentation. Instead, the user need to add the package suffix
"-debuginfo" when using the install command.

The implementation of the debuginfo-install plugin is under development
and tracked upstream. [2]

[1] https://fedoraproject.org/wiki/Changes/SwitchToDnf5
[2] https://github.com/rpm-software-management/dnf5/issues/389
2024-05-30 15:23:32 +02:00
Stanislas Faye
710fbe8875 merge: branch 'sf/add-security-vulnerability-template'
gitlab: Add security vulnerability issue template

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1953
2024-05-30 11:45:16 +00:00
Stanislas FAYE
033cb389ff gitlab: Add security vulnerability issue template
Add security vulnerability issue template and automatically make the
issue confidential with the workflow::triage label.
2024-05-30 11:44:19 +00:00
Fernando Fernandez Mancera
dfff21f559 gitlab: adjust ci.template
The recommendations from freedesktop [1] about how to maintain a Gitlab
project changed therefore we must adapt the rules.

Solves: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1549

[1] https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/540#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
2024-05-29 15:11:02 +02:00
Íñigo Huguet
fdc6ac38f8 merge: branch 'ih/release_chgs'
Release: document how to release and stop doing "dev" releases on stable branches.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1932
2024-05-29 06:45:26 +00:00
Íñigo Huguet
8eb00c0991 release.sh: stop doing "-dev" releases on stable branches
Note: here I refer to the numbers in a version as MAJOR.MINOR.MICRO.

Having stable and development releases do make sense for the MINOR
version, because we maintain separate branches for them and they
evolve separately. We have 1.47.z where we put all the changes so
anyone can pick the latest development release and test it. At the
same time, we have 1.46.z with the latest stable released version.

However, it does not make sense to have 1.46.2 and 1.46.3-dev because
the latter is not a development version. It is identical to 1.46.2,
only the version number has been bumped, there are no changes to test.
When we add commits, we will be actually testing 1.46.3-dev + some
commits, which is exactly the same as testing 1.46.2 + some commits.

So, basically, someone can use the releases of a development BRANCH,
like 1.47.4, to test the development version of NM. But using a
development MICRO version is exactly the same as using a
non-development one.

From now on, we will just increment the MICRO version each time we do a
release on a stable branch and won't create the '-dev' tag. Update
release.sh to do it this way.
2024-05-29 08:44:02 +02:00
Íñigo Huguet
3ceeffb6b8 doc: document how to do a release of NM and VPN plugins
Although VPN plugins are developed separately, better to document here
how to do the release of those that we maintain to avoid having to do
the changes on every repository each time.
2024-05-29 08:43:58 +02:00
Beniamino Galvani
b8061dd4f6 merge: branch 'bg/vpn'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1938

Resolves: https://issues.redhat.com/browse/RHEL-21875
2024-05-27 09:50:22 +02:00
Beniamino Galvani
d1ffdb28eb vpn: allow IP configurations with routes and without addresses
Usually, when the method is "auto" we want to avoid configuring routes
until the automatic method completes. To achieve that, we clear the
"allow_routes_without_address" flag of l3cds when the method is "auto".

For VPNs, IP configurations with only routes are perfectly valid,
therefore set the flag.
2024-05-27 09:45:22 +02:00
Beniamino Galvani
a3ce13c947 core: add nm_l3_config_data_set_allow_routes_without_address()
Add a function to set the allow-routes-without-address flag for
l3cds. It will be used in the next commit.
2024-05-27 09:45:22 +02:00
Beniamino Galvani
b31febea22 core: rename l3cd's "dhcp_enabled" to "allow_routes_without_address"
The name "dhcp_enabled" is misleading because the flag is set for
method=auto, which doesn't necessarily imply DHCP. Also, it doesn't
convey what the flag is used for. Rename it to
"allow_routes_without_address".
2024-05-27 09:45:21 +02:00
Beniamino Galvani
97f185e1f8 vpn: allow IP configurations without addresses
An IPv4-over-IPv6 (or vice-versa) IPsec VPN can return IP
configurations with routes and without addresses. For example, in this
scenario:

         +---------------+         +---------------+
         |  fd01::10/64  <-- VPN -->  fd02::20/64  |
         |     host1     |         |     host2     |
         +-------^-------+         +-------^-------+
                 |                         |
         +-------v-------+         +-------v-------+
         |    subnet1    |         |    subnet2    |
         | 172.16.1.0/24 |         | 172.16.2.0/24 |
         +---------------+         +---------------+

host1 and host2 establish a IPv6 tunnel which encapsulates packets
between the two IPv4 subnets. Therefore, in routed mode, host1 will
need to configure a route like "172.16.2.0/24 via ipsec1" even if the
host doesn't have any IPv4 address on the VPN interface.

Accept IP configurations without address from the VPN; only check that
the address and prefix are sane if they are provided.
2024-05-27 09:45:21 +02:00
Íñigo Huguet
802b3f5af5 merge: branch 'typo-fixes'
various typo fixes detected by lintian

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1940
2024-05-23 10:23:03 +00:00
Michael Biebl
b2e8610cc5 typo fix: Uknown -> Unknown
Detected by lintian:
I: network-manager: spelling-error-in-binary Uknown Unknown [usr/lib/x86_64-linux-gnu/NetworkManager/1.47.90/libnm-device-plugin-wifi.so]
2024-05-23 10:22:33 +00:00
Michael Biebl
e5bf2d24cd typo fix: overriden -> overridden
Detected by lintian:
I: network-manager: typo-in-manual-page overriden overridden [usr/share/man/man5/NetworkManager.conf.5.gz:396]
I: network-manager: typo-in-manual-page overriden overridden [usr/share/man/man5/nm-system-settings.conf.5.gz:396]
2024-05-23 10:22:33 +00:00
Michael Biebl
22314df2ab typo fix: identifer -> identifier
Detected by lintian:
I: network-manager: typo-in-manual-page identifer identifier [usr/share/man/man5/nm-settings-nmcli.5.gz:3018]
I: network-manager: typo-in-manual-page identifer identifier [usr/share/man/man5/nm-settings.5.gz:3018]
2024-05-23 10:22:33 +00:00
Íñigo Huguet
7206eaf8df merge: branch 'ih/pot_in'
po: add nm-setting-generic.c for translation

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1933
2024-05-23 05:57:50 +00:00
Íñigo Huguet
f84282a880 po: add nm-setting-generic.c for translation
Translatable strings were added to nm-setting-generic.c. Add this file to
POTFILES.in.

Fixes: 9322c3e9db ('libnm: add generic.device-handler property')
2024-05-23 05:57:31 +00:00
Íñigo Huguet
efc6a32f58 merge: branch 'th/print-config-crash'
[th/print-config-crash] config: fix crash in assertion during `NetworkManager --print-config`

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1935
2024-05-23 05:57:14 +00:00