Commit Graph

33524 Commits

Author SHA1 Message Date
Íñigo Huguet
0567cfe367 triage: fix typo atention -> attention 2024-09-26 11:04:51 +02:00
Íñigo Huguet
bd177f6d45 merge: branch 'ih/ensure-ci-external-contributor'
triage: ensure that CI is run for MRs from community

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2041
2024-09-26 08:40:21 +00:00
Íñigo Huguet
2c03770649 triage: add link to gitlab-triage docs 2024-09-26 08:40:02 +00:00
Íñigo Huguet
ca59877016 triage: ensure that CI is run for MRs from community
Use a blocking thread to remember the maintainers to run the CI. The
idea is that the maintainers have to run it manually and resolve the
thread.

Due to a limitation in gitlab-triage it has to be done in a weird way:
it is possible to check if the author is member of the project and it is
possible to check if he/she is member of the parent group, but it is not
possible to check if it's member of either one in a single rule. Because
of this a simple rule "author is not member" cannot be created.

To workaround this we create 2 rules to detect if the author IS a member
of the project or the group. If he/she is, we add a label to indicate
it. Then, a 3rd rule checks if this label is missing, and if it's
missing, it means that he/she is not a member.

This issue has been reported to gitlab-triage but it doesn't seem to be
in active maintenaince: https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage/-/issues/362
2024-09-26 08:40:02 +00:00
Beniamino Galvani
fda05b0af0 libnm-core: fix validation of ovs-dpdk interface name
An ovs-dpdk interface doesn't have a kernel link and doesn't have the
15-character limit on the name.

Fixes: 3efe070dfc ('libnm: validate "connection.interface-name" at one place only')

Resolves: https://issues.redhat.com/browse/RHEL-60233

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2044
2024-09-26 09:42:34 +02:00
Fernando Fernandez Mancera
d7d775db82 merge: branch 'ff/fix_ipvlan_setting'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2039
2024-09-24 08:52:59 +02:00
Fernando Fernandez Mancera
5e36063893 test-libnm: add comment explaining one assertion 2024-09-23 17:13:23 +02:00
Fernando Fernandez Mancera
1e70f24378 hsr: fix initialization of port1 and port2 DBus Object property
This was causing test_nml_dbus_meta() unit test to fail and also it was
affecting the notification when the object changed.

Fixes: 5426bdf4a1 ('HSR: add support to HSR/PRP interface')
2024-09-23 17:02:34 +02:00
Fernando Fernandez Mancera
6a898fc0a2 ipvlan: fix libnm unit test for ipvlan setting and dbus
Fixes: d238ff487b ('ipvlan: add support to IPVLAN interface')
2024-09-23 16:05:22 +02:00
Fernando Fernandez Mancera
3b95b39582 merge: branch 'ff/ipvlan_support'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2032
2024-09-18 13:42:00 +02:00
Fernando Fernandez Mancera
8f5c18665a NEWS: add support of ipvlan 2024-09-18 13:19:47 +02:00
Fernando Fernandez Mancera
d238ff487b ipvlan: add support to IPVLAN interface
This patch add support to IPVLAN interface. IPVLAN is a driver for a
virtual network device that can be used in container environment to
access the host network. IPVLAN exposes a single MAC address to the
external network regardless the number of IPVLAN device created inside
the host network. This means that a user can have multiple IPVLAN
devices in multiple containers and the corresponding switch reads a
single MAC address. IPVLAN driver is useful when the local switch
imposes constraints on the total number of MAC addresses that it can
manage.
2024-09-18 13:19:42 +02:00
Fernando Fernandez Mancera
b3bdebbad3 libnm-core: add 1.52 macros 2024-09-18 12:04:39 +02:00
Fernando Fernandez Mancera
7e42486010 merge: branch 'ff/hsr_fixes'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2038
2024-09-17 17:41:47 +02:00
Fernando Fernandez Mancera
a0696e27b8 hsr: add hsr setting to docs generate script
The setting was missing from the script. The patch is adding it and also
regenerates the docs.

Fixes: 5426bdf4a1 ('HSR: add support to HSR/PRP interface')
2024-09-16 17:04:02 +02:00
Fernando Fernandez Mancera
5e4696a693 hsr: use HSR DBus metadata properly
The HSR DBus metadata was defined properly but not exported on the libnm
library properly. This was causing that clients were not showing the HSR
devices.

Fixes: 5426bdf4a1 ('HSR: add support to HSR/PRP interface')
2024-09-16 17:04:02 +02:00
Fernando Fernandez Mancera
4ff3bd3eb5 introspection: fix indentation for HSR device introspection
The file was mixing spaces and tabs. It should only use spaces.

Fixes: 5426bdf4a1 ('HSR: add support to HSR/PRP interface')
2024-09-16 17:04:02 +02:00
Fernando Fernandez Mancera
cfe5432de8 release: bump version to 1.51.1 (development) 2024-09-16 12:30:37 +02:00
Fernando Fernandez Mancera
180f6e3739 release: fix version parsing from meson
Fixes: 6707ce0754 ('build: use meson for version info')
2024-09-16 12:21:00 +02:00
Beniamino Galvani
65c4f5e0de merge: branch 'dhcp_lease'
Copy DHCP lease from src, fixing nm_l3_config_data_new_clone assertion

Closes #1620

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2035
2024-09-12 08:48:15 +00:00
Martin von Gagern
a25d593922 core: fix dhcp leases in l3cd cloning.
This will copy DHCP lease from src (not self), fixing an assertion in
nm_l3_config_data_new_clone.

Resolves: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1620
Fixes: 55b722820d ('l3cfg: fix nm_l3_config_data_new_clone() to make exact copy')
2024-09-11 15:57:11 +01:00
Íñigo Huguet
70868fb469 merge: branch 'bg/nmcs-unit-burst'
cloud-setup: fix placement of directives in the systemd unit

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2030
2024-09-11 13:49:40 +00:00
Beniamino Galvani
a531458456 cloud-setup: fix placement of directives in the systemd unit
The "StartLimitIntervalSec" and "StartLimitBurst" directives should be
in the [Unit] section instead of the [Service] one.

Fixes: 927cff9f17 ('cloud-setup: allow bigger restart bursts')
2024-09-11 13:49:21 +00:00
Jan Vaclav
2896c5a38b merge: branch 'jv/drop-autotools'
all: drop autotools build system

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2020
2024-09-11 12:18:40 +00:00
Jan Vaclav
7766368278 NEWS: mention removal of autotools 2024-09-11 12:18:15 +00:00
Jan Vaclav
593580feae build: remove make/autotools from required packages 2024-09-11 12:18:15 +00:00
Jan Vaclav
4db1829bc7 all: remove misc mentions of autotools in docs 2024-09-11 12:18:15 +00:00
Jan Vaclav
c6de9b8f1b build: remove autotools files 2024-09-11 12:18:15 +00:00
Jan Vaclav
28ada2f0b6 build/specfile: remove autotools configuration 2024-09-11 12:18:15 +00:00
Jan Vaclav
12b5b8317b build: remove autotools configuration from scripts 2024-09-11 12:18:15 +00:00
Jan Vaclav
82a6a82031 gitlab-ci: use meson for check-tree 2024-09-11 12:18:15 +00:00
Jan Vaclav
1b0bd9b9b6 build/release: stop trying to bump version in autotools 2024-09-11 12:18:15 +00:00
Jan Vaclav
6707ce0754 build: use meson for version info 2024-09-11 12:18:15 +00:00
Íñigo Huguet
8d672a46d5 merge: branch 'bg/ovs-netdev-assertion'
ovs: fix assertion failure in netdev datapath mode

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2024
2024-09-11 05:20:58 +00:00
Beniamino Galvani
b6e69f3467 ovs: fix assertion failure in netdev datapath mode
When using the netdev datapath, we wait for the link to appear in
different steps:

 1. initially, in act_stage3_ip_config() connects to platform's
   "link-changed" signal to detect when the TUN interface appears;

 2. when the interface appears, _netdev_tun_link_cb() schedules
   _set_ip_ifindex_tun() in a idle handler;

 3. _set_ip_ifindex_tun() checks if the link is ready (e.g. if the MAC
   address is correct) and in that case it reschedules stage3, which
   will move forward with the activation;

 4. if the link is not ready in _set_ip_ifindex_tun(), the function
   connects again to platform's "link-changed" signal to react to link
   changes;

 5. after the link changes and it is ready, _netdev_tun_link_cb()
   reschedules stage3, which moves forward with the activation;

With the current implementation it is possible that after step 2, if
act_stage3_ip_config() runs because it was already scheduled, it
registers again to the "link-changed" event; then when
_set_ip_ifindex_tun() is invoked it will hit assertion:

  nm_assert(!priv->wait_link.tun_link_signal_id);

Fix this by preventing that the signal gets registered again after
step 2.

Fixes-test: @ovs_datapath_type_netdev_with_cloned_mac

Fixes: acf485196c ('ovs-interface: wait that the cloned MAC changes instead of setting it')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2024
2024-09-11 05:20:46 +00:00
Íñigo Huguet
67416d52f4 merge: branch 'ih/distros-supported'
ci: update distros-info.yml and add script to extract useful info from it

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2025
2024-09-10 11:44:16 +00:00
Íñigo Huguet
1b614540b8 distros-info: add option to print all active NM branches
Add option --all to distros_support.py to show all the NM versions that
are being actively used by any active distro. This will be useful to
decide what stable branches are we interested into actively backporting
fixes and which ones we're not.
2024-09-10 11:32:32 +00:00
Íñigo Huguet
8be5aae5b9 ci: update config.yml with the latest info about distros
Content autogenerated by .gitlab-ci/distros_support.py from the content
of .gitlab-ci/distros-info.yml.
2024-09-10 11:32:32 +00:00
Íñigo Huguet
6f34b404e8 distros-info: add script to extract useful info from distros-info.yml
Passing a version number of NetworkManager to this new script, it prints
what distros are using that NM version and generates a new content for
.gitlab-ci/config.yml.

Automatically generating the config.yml content is useful because we can
easily update what distros we test in the CI and the Tier that they
belong, depending on what version of NM do they ship and whether they
have reached EOL or not.

Important: when generating a config.yml for an stable branch, not for
main, it must be generated from main. This is because we are not going
to keep distros-info.yml up to date in all branches, only in main.
2024-09-10 11:32:32 +00:00
Íñigo Huguet
79272e5379 distros-info: update some distros and add useful links
Update the info of some distros.

Add links to facilitate consulting the information in the future when we
want to update it again.
2024-09-10 11:32:32 +00:00
Íñigo Huguet
c985fd19d2 merge: branch 'bg/ip-config-search-fix'
core: fix access to uninitialized memory in NMIPConfig

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2031
2024-09-10 11:28:58 +00:00
Beniamino Galvani
f61a56e25f core: fix access to uninitialized memory in NMIPConfig
The string array returned by nm_l3_config_data_get_searches() is not
NULL-terminated; we need to pass the exact length to
nm_utils_buf_utf8safe_escape_strv() instead of letting the function
scan for the NULL terminator.

Fix the following error reported by valgrind:

  Conditional jump or move depends on uninitialised value(s)
     at 0x4B287DB: g_strv_length (gstrfuncs.c:2948)
     by 0x6EBDBE: nm_utils_buf_utf8safe_escape_strv (nm-shared-utils.c:3047)
     by 0x59A3F1: get_property_ip (nm-ip-config.c:198)
     by 0x4A6E150: UnknownInlinedFun (gobject.c:2140)
     by 0x4A6E150: g_object_get_property (gobject.c:3454)
     by 0x56FB1A: nm_dbus_utils_get_property (nm-dbus-utils.c:95)
     by 0x44B343: _obj_get_property (nm-dbus-manager.c:880)
     by 0x44DC4F: _nm_dbus_manager_obj_notify (nm-dbus-manager.c:1201)
     by 0x56EE77: dispatch_properties_changed (nm-dbus-object.c:253)
     by 0x4A5BF1E: g_object_notify_queue_thaw.lto_priv.0 (gobject.c:755)
     by 0x5997BD: _handle_l3cd_changed (nm-ip-config.c:837)
     by 0x59A129: _l3cfg_notify_cb (nm-ip-config.c:147)
     by 0x4A5B649: g_closure_invoke (gclosure.c:834)

Fixes: 522a7d6baf ('nm-ip-config: escape searches when exposing to dbus')
2024-09-10 09:09:51 +02:00
Jan Vaclav
e779c25690 merge: branch 'jv/escape-ra-searches'
nm-ip-config: escape searches when exposing to dbus

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1993
2024-09-09 11:11:02 +00:00
Jan Vaclav
522a7d6baf nm-ip-config: escape searches when exposing to dbus
Previously, when a connection was configured with search domains
that contained non-ASCII characters, GLib would try to parse the
search name as UTF-8, and an assertion would fail (which meant
that if NM was running with fatal assertions, it would crash).

Expose the search domains only as an escaped string to avoid this.
2024-09-02 12:24:28 +00:00
Jan Vaclav
142e72b5b5 glib-aux: add nm_utils_buf_utf8safe_escape_strv()
This function allows us to escape whole strv arrays, only
copying them when necessary, indicated by the "to_free"
output parameter.
2024-09-02 12:24:28 +00:00
Jan Vaclav
c9fefcd095 nmtui: correctly check that connection list is non-empty
Previously, the "edit" or "delete" buttons were clickable even
if there were no available connections, which was not expected
and caused an assertion to fail when clicked. This is because
the connections list could contain connections that were later
filtered out and not displayed in the final list, but the check
did not take this into account.

Make it so that the buttons are clickable only if we *actually*
have any available connections to edit or delete.

Fixes: 3bda3fb60c ('nmtui: initial import of nmtui')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1991
2024-09-02 12:08:00 +00:00
Beniamino Galvani
abbaa9b629 libnm, nmcli: fix "Since" version for ipv4.link-local=fallback
Fixes: c575293f1b ('device: add ipv4.link-local=fallback (IPv4LL set iff no other IPv4 set)')
2024-09-02 11:52:59 +02:00
Beniamino Galvani
113cc71939 NEWS: update for 1.52 2024-09-02 11:36:59 +02:00
Beniamino Galvani
0f975525a0 merge: branch 'll4_until_dhcp'
Add ipv4.link-local=fallback

Closes #1562

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1980
2024-09-02 08:19:40 +00:00
Dominique Martinet
c575293f1b device: add ipv4.link-local=fallback (IPv4LL set iff no other IPv4 set)
When a connection with ipv4.method=auto (DHCP) is configured with
ipv4.link-local=enable we were leaving the link-local address forever,
but this is not correct according to RFC3927[1] which says:
  a host SHOULD NOT have both an operable routable address and an IPv4
  Link-Local address configured on the same interface.

This adds a new mode that is more compliant, which only sets an IPv4
link-local address if no other address is set (through either DHCP lease
or ivp4.addresses setting)

Closes #1562

Link: https://github.com/systemd/systemd/issues/13316
Link: https://datatracker.ietf.org/doc/html/rfc3927#section-1.9 [1]
2024-09-02 08:16:18 +00:00