Commit Graph

33549 Commits

Author SHA1 Message Date
Lubomir Rintel
07742d819a Revert "Update file ru.po"
This reverts commit 12b15f6b7f.
2024-07-31 12:00:46 +02:00
jtux270
12b15f6b7f Update file ru.po 2024-07-31 11:58:31 +02:00
Lubomir Rintel
8d2ca7636d settings: call removed plugins "obsolete" not "deprecated"
The ifcfg-rh plugin is deprecated, yet still present. Call the removed
plugins something different.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1989
2024-07-31 11:57:36 +02:00
Lubomir Rintel
ab3d9ea949 meson: state that ifcfg-rh is deprecated in config summary
It's been deprecated for some time, but it doesn't hurt to point it out.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1989
2024-07-31 11:57:29 +02:00
Fernando Fernandez Mancera
40d51b9104 ovs: fix triggering stage3 activation without DHCP client initialized
It is possible that we learn the link is ready on stage3_ip_config
rather than in link_changed event due to a stage3_ip_config scheduled by
another component. In such cases, we proceed with IP configuration
without allocating the resources needed like initializing DHCP client.

In order to avoid that, if we learn during stage3_ip_config that the
link is now ready, we need to schedule another stage3_ip_config to
allocate the resources we might need.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2004

Fixes: 83bf7a8cdb ('ovs: wait for the link to be ready before activating')
2024-07-31 10:57:03 +02:00
Beniamino Galvani
a367f8770b rpm: add "Obsoletes" for removed ifcfg packages in F41
Add the "Obsoletes" to the removed ifcfg packages, so that they are
properly removed on upgrade. Otherwise, the upgrade to the new NM
fails due to failed dependencies.

Fixes: 777418dfd7 ('rpm: disable ifcfg support in Fedora 41')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2001
2024-07-26 11:32:19 +02:00
Beniamino Galvani
c437625a76 ndisc: preserve router preferences
If we add multiple default routes with the same metric and different
preferences, kernel merges them into a single ECMP route, with overall
preference equal to the preference of the first route
added. Therefore, the preference of individual routes is not
respected.

To avoid that, add routes with different metrics if they have
different preferences, so that they are not merged together.

We could configure only the route(s) with highest preference ignoring
the others, and the effect would be the same. However, it is better to
add all routes so that users can easily see from "ip route" that there
are multiple routers available.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1468
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1983

Fixes: 032b4e4371 ('core: use router preference for IPv6 routes')
2024-07-26 09:12:53 +02:00
Fernando Fernandez Mancera
815505fc43 release: bump version to 1.49.3 (development) 2024-07-25 12:04:09 +02:00
Fernando Fernandez Mancera
19040369c3 NEWS: update changes in 1.50 2024-07-25 11:18:26 +02:00
Fernando Fernandez Mancera
83bf7a8cdb ovs: wait for the link to be ready before activating
When activating an ovs-interface we already wait for the cloned MAC
address to be set, ifindex is present and platform link also present but
in some cases this is not enough.

If an udev rule is in place it might modify the interface when it is in
a later stage of the activation causing some race conditions or
problems. In order to solve that, we must wait until the link is fully
initialized.
2024-07-25 10:34:56 +02:00
Beniamino Galvani
4196f26378 merge: branch 'bg/policy-dispose'
policy: assert that the auto-activate list is empty on dispose

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1986
2024-07-24 13:33:34 +00:00
Beniamino Galvani
27b646cfa1 policy: assert that the auto-activate list is empty on dispose
We are currently asserting that the list of devices waiting for
auto-activation in NMPolicy is not empty. This condition is always
false because:

 - NMDevice holds a reference to NMManager
 - NMManager holds a reference to NMPolicy
 - on dispose, NMDevice asserts that it's not in NMPolicy's
   auto-activate list

Therefore if there is any NMDevice alive, NMPolicy must be alive as
well. Instead, if there is no NMDevice alive the list must be empty.

The assertion could fail only when the NMPolicy instance gets
disposed, which usually doesn't happen because it's still referenced
at shutdown.

Fixes: aede228974 ('core: assert that devices are not registered when disposing NMPolicy')
2024-07-23 10:15:43 +02:00
Lubomir Rintel
7f8f68d28a Revert "wwan: Ensure we get existing objects on reset"
This reverts commit c0ddcf2998.
Causes testing to fail.
2024-07-22 15:21:44 +02:00
Beniamino Galvani
777418dfd7 rpm: disable ifcfg support in Fedora 41
https://fedoraproject.org/wiki/Changes/RemoveIfcfgSupportInNM
https://bugzilla.redhat.com/show_bug.cgi?id=2296272
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1985
2024-07-16 14:35:31 +02:00
Gris Ge
83a2595970 activation: Allow changing controller of exposed active connection
When activating a port with its controller deactivating by new
activation, NM will register `state-change` signal waiting controller to
have new active connections. Once controller got new active connection,
the port will invoke `nm_active_connection_set_controller()` which lead
to assert error on
    g_return_if_fail(!nm_dbus_object_is_exported(NM_DBUS_OBJECT(self)))

because this active connection is already exposed as DBUS object.

To fix the problem, we remove the restriction on controller been
write-only and notify DBUS object changes for controller property.

Signed-off-by: Gris Ge <fge@redhat.com>
2024-07-12 17:38:01 +08:00
Beniamino Galvani
a51159f4e8 dhcp: fix indentation
Fixes: bc5d76ca82 ('core/dhcp: adjust client plugin priority')
2024-07-12 11:33:19 +02:00
Lubomir Rintel
3d82b9b318 merge: branch 'lr/deprecate-dhclient'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1988
2024-07-11 15:46:31 +02:00
Lubomir Rintel
d246d9df88 merge branch 'lr/simpler-rpm'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1990
2024-07-11 12:29:26 +02:00
Lubomir Rintel
350ac5acd9 merge: branch 'lr/rpms'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1955
2024-07-11 12:23:12 +02:00
Lubomir Rintel
037450df45 contrib/rpm: remove conditionals for RHEL 7 and older
There's just too much clutter in the SPEC file. Drop some totally
obsolete stuff.
2024-07-11 12:13:33 +02:00
Lubomir Rintel
1ccc1e0041 contrib/rpm: install firewall zone unconditionally
It's the same on all systems we care about.
2024-07-11 12:13:33 +02:00
Lubomir Rintel
954e8c8d64 contrib/rpm: stop conditionalizing default DHCP client
It's the same on all systems we care about.
2024-07-11 12:13:33 +02:00
Lubomir Rintel
811ef6952d contrib/rpm: remove extra 0%{?rhel} from some conditionals
"0%{?rhel} && 0%{?rhel} >= 8" just says 0%{?rhel} twice, redundantly.
Let's not do that.
2024-07-11 12:13:33 +02:00
Lubomir Rintel
c639387071 contrib/rpm: remove ldconfig scriptlets
The file triggers replaced this aeons ago. RHEL 8 definitely has them:

  [root@el8 ~]# rpm -q --filetriggers glibc-common
  transfiletriggerin scriptlet (using /bin/sh) -- /lib, /lib64, /usr/lib, /usr/lib64
  /sbin/ldconfig
  transfiletriggerpostun scriptlet (using /bin/sh) -- /lib, /lib64, /usr/lib, /usr/lib64
  /sbin/ldconfig
  [root@el8 ~]#
2024-07-11 12:13:33 +02:00
Lubomir Rintel
c72a52ed36 NEWS: document dhclient deprecation
https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:32 +02:00
Lubomir Rintel
a2914f1d0a rpm: disable dhclient on Fedora 41 and RHEL 10
They're off by default, but SPEC file turns them on. Don't do that in
future distros.

https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:32 +02:00
Lubomir Rintel
05b4610667 man: update dhcp client manual after dhclient deprecation
Reflect the change in priority and deprecation in the manual.
Hopefully make it slightly easier to read along the way.

https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:32 +02:00
Lubomir Rintel
3955be817d core/dhcp-manager: warn if dhclient plugin is requested
It's deprecated. Warn any time it is being considered for loading,
instead of at load time, so that the user gets a warning when they got
the plugin in configuration, even if it's build time disabled.

https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:31 +02:00
Lubomir Rintel
bc5d76ca82 core/dhcp: adjust client plugin priority
Prioritize internal, which is what most people should be using. Try
dhclient last, so that it's not attempted when not explicitly
configured or everything else fails.
2024-07-11 11:09:31 +02:00
Lubomir Rintel
001b3e9494 build/meson: deprecate dhclient
Make it off by default. Point out it's deprecated in a config summary.

It's not maintained upstream. There's probably not much justification for
using it any more and we'd like to remove it at some point.

https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:31 +02:00
Lubomir Rintel
49f872e6b5 build/autoconf: deprecate dhclient
Make it off by default. Point out it's deprecated in a config summary.

It's not maintained upstream. There's probably not much justification for
using it any more and we'd like to remove it at some point.

https://issues.redhat.com/browse/RHEL-24622
2024-07-11 11:09:31 +02:00
Fernando Fernandez Mancera
c8005a4e65 merge: branch 'bg/wifi-ap-channel-width'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1950
2024-07-10 14:55:07 +02:00
Beniamino Galvani
7bb5961779 supplicant: honor the 'wifi.channel-width' property in AP mode 2024-07-10 14:53:32 +02:00
Beniamino Galvani
a591c0ca95 libnm,nmcli: add a 'wifi.channel-width' setting
At the moment, the access point mode uses 20MHz channels. Introduce a
new 'wifi.channel-width' property that allows the use of a larger
bandwidth, thus increasing performances.
2024-07-10 14:53:32 +02:00
Beniamino Galvani
c32c731272 libnm-core: add 1.50 macros 2024-07-10 14:53:32 +02:00
Lubomir Rintel
c8ff1b30fb nmcli/dev: use secret agent for nmcli d [wifi] connect
Instead of asking the Wi-Fi password in advance (or not at all, if we're
creating a new connection for "nmcli d conn"), use the secret agent.

This makes things consistent with other places where we handle the secrets
for an activating connection in nmcli ("nmcli c up", "nmcli d con" with
an existing connection).

This also fixes the situation where the secrets would stop being
required, such as on enrollment via WPS button press on a router.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1960
2024-07-10 14:40:12 +02:00
Lubomir Rintel
51a43fb301 contrib/rpm: pull in formatting fixes from Fedora 2024-07-10 14:21:19 +02:00
Lubomir Rintel
3d0ddfd6be contrib/rpm: turn %ifcfg_migrate into a bcond 2024-07-10 14:21:19 +02:00
Lubomir Rintel
151decd333 contrib/rpm: turn %ifcfg_warning into a bcond 2024-07-10 14:21:19 +02:00
Lubomir Rintel
cfc6cd7a74 contrib/rpm: turn %split_ifcfg_rh into a bcond 2024-07-10 14:21:19 +02:00
Lubomir Rintel
2066e1743e contrib/rpm: turn %with_ifcfg_rh into a bcond 2024-07-10 14:21:19 +02:00
Lubomir Rintel
e4660336e7 contrib/rpm: turn %config_plugins_default_ifcfg_rh into a bcond 2024-07-10 14:21:19 +02:00
Lubomir Rintel
b87845b584 libnmc/secret-agent-simple: advise if WPS PBC enrollment is active
Print a different message on "nmcli --ask d wifi connect" if WPS
enrollment is in progress.

This is the same as GNOME Shell's secret agent (and perhaps
others) do.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1961
2024-07-10 13:15:04 +02:00
Fernando Fernandez Mancera
4f7c04eaf9 tools: add nm-to-rhcos script to our toolset
Script to create a RHCOS custom image containing a NetworkManager rpm from
a copr repository.

In order to have a custom RHCOS image, we cannot modify the image itself but
we can add a custom layered image that includes all RHCOS functionality and
adds additional functionality to it.

Requirements:
- A quay.io registry where you have push access.
- You must have your pull-secret in the same directory where the script is
being run. You can download your pull-secret from:
https://console.redhat.com/openshift/install/pull-secret

In order to install this on nodes from a cluster that already exists it must
be done using MachineConfig operator. In essence the following YAML file
must be created.

```
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: <role>
  name: os-layer-custom-nm
spec:
  osImageURL: <registry>
```

Please, notice that the role and registry need to be set to your needs.

Then, it can be applied by:

$ oc create -f <yaml file>

Finally, the machines will be ready once the field UPDATED has the True value
in the output of this command.

$ oc get mcp
2024-07-08 13:50:52 +02:00
Stanislas FAYE
71383394d5 release: bump version to 1.49.2 (development) 2024-07-05 13:33:24 +02:00
Stanislas Faye
c05f8d4758 merge: branch 'sf/update-news-for-1.50'
NEWS: update changes in 1.50

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1982
2024-07-05 07:46:00 +00:00
Stanislas FAYE
8e8277bedc NEWS: update changes in 1.50 2024-07-05 09:07:37 +02:00
Beniamino Galvani
5aa5d87ed6 merge: branch 'bg/hostname-fallback-hosts'
Consider entries in /etc/hosts for hostname resolution

https://issues.redhat.com/browse/RHEL-33435
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1974
2024-07-04 13:41:13 +00:00
Beniamino Galvani
543ebef32b docs: document the hostname management workflow 2024-07-04 15:39:03 +02:00
Beniamino Galvani
410afccb32 core: also use /etc/hosts for hostname resolution
Before introducing the hostname lookup via nm-daemon-helper and
systemd-resolved, we used GLib's GResolver which internally relies on
the libc resolver and generally also returns results from /etc/hosts.

With the new mechanism we only ask to systemd-resolved (with
NO_SYNTHESIZE) or perform the lookup via the "dns" NSS module. In both
ways, /etc/hosts is not evaluated.

Since users relied on having the hostname resolved via /etc/hosts,
restore that behavior. Now, after trying the resolution via
systemd-resolved and the "dns" NSS module, we also try via the "files"
NSS module which reads /etc/hosts.

Fixes: 27eae4043b ('device: add a nm_device_resolve_address()')
2024-07-04 15:39:03 +02:00