Commit Graph

33549 Commits

Author SHA1 Message Date
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
Dominique Martinet
b3d2902ad4 l3cfg: add new NM_L3_CONFIG_DAT_FLAGS_HAS_IPV4_NON_LL flag
Add a new l3cfg DatFlag to specify that a given l3cd has a
    non-link-local IPv4 set.
    This will be used to enable or disable IPv4LL automatically in fallback
    mode.
2024-09-02 08:16:18 +00:00
Dominique Martinet
beaf4f8db3 l3cfg/ipv4ll: add new nm_platform_ip4_address_is_link_local() helper
Move the static _ip4_address_is_link_local() check to a new global
nm_platform_ip4_address_is_link_local() helper so we can check if
an IPv4 is link local in other files
2024-09-02 08:16:18 +00:00
Dominique Martinet
b39e38f272 device: set dhcpx state back to pending when lease lost
When lease is lost we would keep the DHCP state to READY, but we are
trying to get a new lease at this point so it is closer to PENDING.

Note this does not change how the device is displayed in `nmcli device`,
a connection with an expired lease is still displayed as `connected`.
2024-09-02 08:16:18 +00:00
Beniamino Galvani
a09f9cc616 l3cfg: ensure the probing timeout is initialized on probe start
When handling event TIMEOUT, "acd_data->probing_timeout_msec" needs to
be always initialized before jumping to "handle_start_probing:";
otherwise, an assertion failure is triggered at:

  static void
  _l3_acd_data_timeout_schedule_probing_restart(AcdData *acd_data, gint64 now_msec)
  {
    ...
    nm_assert(acd_data->probing_timeout_msec > 0);

Even if the ACD data is already in state PROBE, that doesn't mean that
the timeout is already initialized because the PROBE state can also be
reached from a INSTANCE_RESET event; and depending on the previous
state "acd_data->probing_timeout_msec" could be uninitialized.

Fixes-test: @iptunnel_restart
Fixes: b8f9d7b5dd ('l3cfg: rework ACD handling in NML3Cfg to support handling conflicts')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2023
2024-09-02 10:04:11 +02:00
Fernando Fernandez Mancera
851c411df0 release: bump version to 1.51.0 (development) 2024-08-30 14:21:27 +02:00
Fernando Fernandez Mancera
556231a5c9 release: bump version to 1.49.90 (1.50-rc1) 2024-08-30 14:14:15 +02:00
Lubomir Rintel
288ac99211 release: bump version to 1.49.6 (development) 2024-08-29 12:10:58 +02:00
Filip Pokryvka
72a410c1ad nmcli: fix bash completion for fields
The code handling options with supposes, that options
are split by `=`, which is not the case. This fixes the following:

```
nmcli -f ipv4.ad\t\t
nmcli -f ipv4.ad=ipv4.addresses

nmcli --field ipv4.ad\t\t
nmcli --field ipv4.ad=ipv4.addresses
```

Using options with values separated with `=` remains broken,
but this change doesn't affect it:

```
nmcli --field=ipv4.ad\t\t
nmcli --field=ipv4.ad
```

Also, `man` and `usage` uses `--color auto|yes|no`,
not `--color=auto|yes|no`. So, this fix should be sufficient.

Bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=2115827
2024-08-28 15:44:01 +02:00
Fernando Fernandez Mancera
d8c924caa2 merge: branch 'ih/sys-iface-state-log'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2018
2024-08-28 15:36:36 +02:00
Íñigo Huguet
7dae55f0f2 core: rename NM_DEVICE_MANAGED_TYPE_MANAGED to _TYPE_FULL
Managed type = managed is a bit unclear, because all managed types are
for devices that are managed, but with different levels. Managed type =
managed could be interpreted as other types are unmanaged. Change it to
managed type = full.
2024-08-28 15:35:56 +02:00
Íñigo Huguet
573c48d034 core: rename sys-iface-state to managed-type internally
The previous name was not very self explanatory. Managed type indicates
a bit better what the meaning is.
2024-08-28 15:35:56 +02:00
Íñigo Huguet
b2930f5361 log: show sys-iface-state as managed-type in log messages
This is a better hint for users about the meaning of this value.
2024-08-28 15:35:56 +02:00
Íñigo Huguet
72014db629 cloud-setup: azure: ensure that primary address is placed first
The primary address is that placed at position 0 of all the IP Addresses
of the interface. Sometimes we put it in a different position in the
ipv4s array because we insert them in the order we receive, but it might
happen that the HTTP responses comes back in wrong order.

In order to solve this, we pass the index of the IPv4 address to the
callback and the address is added in the right position directly.

Co-authored-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2024-08-28 15:29:18 +02:00
Lubomir Rintel
927cff9f17 cloud-setup: allow bigger restart bursts
On daemon startup, we may end up enqueueing many nm-cloud-setup.service
restarts in very a short time. That is perfectly fine, just bump the
thresholds so that systemd doesn't get in the way too quickly.

100 requests in 1 seconds seem like a fair choice -- little bit on the
conservative side, yet still giving the service manager some room to
interfere on a chance things really go awry.

https://issues.redhat.com/browse/RHEL-49694
2024-08-28 11:26:11 +02:00
Íñigo Huguet
01bee5a6ad po: add nmtui/nmt-page-veth.c to POTFILES.in
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1943

Fixes: 187ff4c73b ('nmtui: add veth page')
Reported-by: Piotr Drąg
2024-08-27 09:59:54 +02:00
Íñigo Huguet
fedc37ac48 autotools: fix another filename that was renamed
Fixes: 090d617017 ('src: drop most master references from the code')
2024-08-22 14:44:06 +02:00
Fernando Fernández Mancera
f151952e29 merge: branch 'pre-down-no-network-fix'
device: don't enforce IP cleanup on deactivating state

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2016
2024-08-22 12:25:49 +00:00
Jonathan Kang
c61c552077 device: don't enforce IP cleanup on deactivating state
Don't enforce IP cleanup when devices are in deactivating state, to
make sure that network connection is still available for pre-down
dispatcher phase.

Fixes ac4e63ddda ('ip: support dhcp-send-release in NMSettingIpConfig')

https://bugzilla.suse.com/show_bug.cgi?id=1228154
2024-08-22 12:25:31 +00:00
Íñigo Huguet
56f3911b49 autotools: fix filename that was renamed
Fixes: 090d617017 ('src: drop most master references from the code')
2024-08-22 12:02:48 +02:00
Íñigo Huguet
63818a213b release: bump version to 1.49.5 (development) 2024-08-21 13:54:01 +02:00
Íñigo Huguet
1de0781146 CI: regenerate template 2024-08-21 10:52:49 +02:00
Íñigo Huguet
d5a7d859a5 debian: install policykit-1 or polkitd depending on the version
Old Debian and Ubuntu versions didn't have a separate polkitd yet. Make
both optional so it's installed the one that is available.
2024-08-21 10:37:42 +02:00
Íñigo Huguet
d899f8a1ca merge: branch 'ih/debian-polkit'
CI: fix some distros that fails to install

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2015
2024-08-21 07:59:07 +00:00
Íñigo Huguet
afefa1acde ci: remove CentOS Stream 8 (EOLd)
It even fails to download the image.
2024-08-21 09:00:05 +02:00
Íñigo Huguet
66636370f9 debian: install polkitd instead of policykit-1
Commit c19b5d76c2 ('contrib: install "policykit-1" package on Debian')
added policykit-1 because it was needed to get a translation file.

In recent Debian versions it has been removed. It was only a
transitional package to install polkitd and pkexec. Install polkitd
directly instead.
2024-08-21 08:56:06 +02:00