Commit graph

34212 commits

Author SHA1 Message Date
Stanislas Faye
2370a9005f merge: branch 'sf/expose-global-metered-state-in-nmcli'
cli: Expose global metered state in nmcli

Closes #681

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1856
2024-02-05 20:18:46 +00:00
Stanislas FAYE
3bdb8666f2 cli: Implement display of global metered state in nmcli general
This commit introduces the display of the global metered state in the
`nmcli general` command output.
Key changes:
- Parse and display the global metered state
2024-02-05 20:54:28 +01:00
Javier Sánchez Parra
854f7275de nmtui: fix WireGuard peer editor empty fields
Previously, input fields for peer attributes such as 'Public Key' were
not pre-populated with the existing settings of the peer. This was due
to the WireGuard peer editor class not setting its peer property during
object construction, as the necessary flag was absent. This commit
addresses and fixes this issue.

Closes #1443

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1851
(cherry picked from commit 7e7d3a7981)
2024-02-02 12:53:22 +01:00
Fernando Fernandez Mancera
cbf8723273 merge: branch 'ff/conscious_language_autoconnect_slaves'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1844

(cherry picked from commit 0607340922)
2024-02-02 12:52:20 +01:00
Fernando Fernandez Mancera
b0b068e103 all: use the new NMSettingConnection autoconnect-ports property
(cherry picked from commit 8a08a74abf)
2024-02-02 12:52:20 +01:00
Fernando Fernandez Mancera
513eda352e connection: deprecate NMSettingConnection autoconnect-slaves property
To embrace inclusive language, deprecate the NMSettingConnection
autoconnect-slaves property and introduce autoconnect-ports property.

(cherry picked from commit 194455660d)
2024-02-02 12:52:20 +01:00
Fernando Fernandez Mancera
37972c9fe2 setting: add property_type field to _nm_setting_property_define_direct_enum
In order to make _nm_setting_property_define_direct_enum more flexible,
this patch is introducing property_type argument to it. When set to NULL
it will set property_type to nm_sett_info_propert_type_direct_enum.

(cherry picked from commit b90dd247be)
2024-02-02 12:52:20 +01:00
Fernando Fernandez Mancera
13281fbd20 internal: add direct_is_aliased_field flag to NMSettInfoProperty
(cherry picked from commit 2921fe7aac)
2024-02-02 12:52:20 +01:00
Fernando Fernandez Mancera
e1e612a60b tests: drop unit tests related to from_dbus/to_dbus function
Defining the wrong from_dbus/to_dbus functions is something not
probable. The unit test is just getting in the way of those who knows
what they do and force contributors to change the same thing in multiple
places.

(cherry picked from commit 2f1b599fe3)
2024-02-02 12:52:20 +01:00
Javier Sánchez Parra
7e7d3a7981 nmtui: fix WireGuard peer editor empty fields
Previously, input fields for peer attributes such as 'Public Key' were
not pre-populated with the existing settings of the peer. This was due
to the WireGuard peer editor class not setting its peer property during
object construction, as the necessary flag was absent. This commit
addresses and fixes this issue.

Closes #1443

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1851
2024-02-02 12:47:16 +01:00
Fernando Fernandez Mancera
0607340922 merge: branch 'ff/conscious_language_autoconnect_slaves'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1844
2024-01-31 11:38:33 +01:00
Fernando Fernandez Mancera
8a08a74abf all: use the new NMSettingConnection autoconnect-ports property 2024-01-31 11:29:07 +01:00
Fernando Fernandez Mancera
194455660d connection: deprecate NMSettingConnection autoconnect-slaves property
To embrace inclusive language, deprecate the NMSettingConnection
autoconnect-slaves property and introduce autoconnect-ports property.
2024-01-31 11:29:06 +01:00
Fernando Fernandez Mancera
b90dd247be setting: add property_type field to _nm_setting_property_define_direct_enum
In order to make _nm_setting_property_define_direct_enum more flexible,
this patch is introducing property_type argument to it. When set to NULL
it will set property_type to nm_sett_info_propert_type_direct_enum.
2024-01-31 11:29:06 +01:00
Fernando Fernandez Mancera
2921fe7aac internal: add direct_is_aliased_field flag to NMSettInfoProperty 2024-01-31 11:29:06 +01:00
Fernando Fernandez Mancera
2f1b599fe3 tests: drop unit tests related to from_dbus/to_dbus function
Defining the wrong from_dbus/to_dbus functions is something not
probable. The unit test is just getting in the way of those who knows
what they do and force contributors to change the same thing in multiple
places.
2024-01-31 11:29:06 +01:00
Thomas Haller
5f7a027f59
glib-aux: fix atomic pattern in nm_ref_string_unref()
It's simply not valid to read the ref-count without an atomic.
The compiler might optimize out the assignment to "r" and read the
_ref_count field multiple times. Thereby, we might at first appear
to be larger than > 1, and later pass 1 to compare-and-exchange.

We need an atomic get here.

Fixes: 19d4027824 ('refstr: inline nm_ref_string_{ref,unref}()')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1847
2024-01-30 12:07:29 +01:00
Jan Vaclav
d1d96de3a1 merge: branch 'jv/wireless-use-strv'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1803
2024-01-30 11:13:20 +01:00
Jan Vaclav
49322bb66c libnm-core: replace mac_address_blacklist type GArray with NMValueStrv
This replaces the underlying type of mac_address_blacklist, which is currently GArray,
with a more re-usable NMValueStrv, which allows us to implement it as a direct property.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1803
2024-01-30 10:12:32 +00:00
Jan Vaclav
63c4827af2 libnm-core: add direct_strv_not_null property
This property indicates that a non-null strv array is expected, and
an empty strv array should be returned instead of NULL if it hadn't
been created yet.
2024-01-30 10:12:32 +00:00
Jan Vaclav
66887fafef libnm-core: add MAC address handling to _property_direct_set_strv function
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1803
2024-01-30 10:12:32 +00:00
Jan Vaclav
641e717797 libnm-core: fix mac comparison in _remove_mac_blacklist_item_by_value
The comparison checking for MAC address equality had previously been flipped around.

Fixes: b084ad7f2b ('libnm-core: canonicalize hardware addresses in settings')
2024-01-30 10:12:32 +00:00
Íñigo Huguet
d2f14b40b5 merge: branch 'main'
Update German translation

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1850
2024-01-30 07:57:16 +00:00
Christian K
090b392479 Update German translation 2024-01-30 07:56:53 +00:00
Íñigo Huguet
564724086b merge: branch 'main'
Update Russian translation

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1838
2024-01-30 07:27:47 +00:00
jtux270
14b4c99ded Update file ru.po 2024-01-30 07:27:35 +00:00
Jan Vaclav
e081c716f1 merge: branch 'jv/meson-build-clean'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1845
2024-01-29 14:21:39 +01:00
Jan Vaclav
43c3409081 contrib: add jq to REQUIRED_PACKAGES
jq is used in contrib/fedora/rpm/release.sh and now
also build_clean.sh, so it should probably be added
to REQUIRED_PACKAGES.
2024-01-29 13:21:16 +00:00
Jan Vaclav
95f7c8e128 contrib/fedora: add --meson option to build_clean
This allows the script user to complete the entire build only using meson instead of autotools.
2024-01-29 13:21:16 +00:00
Jan Vaclav
7502787959 build: include meson-dist-data script in dist generated by autotools
The script had not been previously included in the distribution tarball
due to an oversight.

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

Fixes: 1c41066a40 ('build: include documentation in meson dist')
2024-01-29 13:16:19 +00:00
Fernando Fernandez Mancera
e9e456d9ad doc: regenerate docs for "connection.mdns"
As the documentation for "connection.mdns" was modified, we need to
regenerate the docs.
2024-01-29 12:08:32 +01:00
Thomas Haller
0ce996ba18
doc: merge branch 'th/doc-mdns'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1467

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1841
2024-01-29 09:52:04 +01:00
Thomas Haller
1128bceab9
doc: clarify limitation of parsing values in "NetworkManager.conf"
This really should be fixed, because it's a non-obvious limitation.
Anyway, document it for now.
2024-01-29 09:50:37 +01:00
Thomas Haller
fa503e402d
doc: clarify default for "connection.mdns" in manual
The default in systemd-resolved is nowadays "yes". In any case, since
the setting is configurable systemd-resolved, don't describe it in the
manual page.

Instead, clarify the behavior and try to improve the documentation.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1467
2024-01-29 09:50:29 +01:00
Beniamino Galvani
f1761c0184 merge: branch 'bg/vpn-ipv6-route-prefsrc'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1834
2024-01-29 08:58:41 +01:00
Beniamino Galvani
c415eaca76 vpn: accept pref-src for IPv6 routes returned by plugins
As done for IPv4 in commit 3b145a33b7 ('vpn-connections: allow the
plugin to specify route preferred src'), allow VPN plugins to return a
preferred source address for routes. Still accept the old format.
2024-01-29 08:54:08 +01:00
Beniamino Galvani
23f45d0e18 vpn: simplify routes parsing code
Split the IPv4 and IPv6 cases to make the following commit simpler.
2024-01-29 08:54:07 +01:00
Stanislas FAYE
c3acd38645 release: bump version to 1.47.0 (development) 2024-01-25 01:27:55 +01:00
Stanislas FAYE
ee21ca8743 release: bump version to 1.45.90 (1.46-rc1) 2024-01-25 01:16:53 +01:00
Wen Liang
792bf3cdd1 libnm: merge branch 'empty_addr_with_route'
https://issues.redhat.com/browse/RHEL-5098
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1832
2024-01-24 09:24:00 -05:00
Wen Liang
0e7bda8ad8 libnm: allow configuring static route when address is empty
OpenShift MetalLB team requests to configure additional routes
whenever the nodes does not have a configured IP address or route for
the subnet in which MetalLB issues addresses.

Note in linux network stack, it does not matter what interface you add
the address on a node (for example, loopback), the kernel is always
processing arp-requests and sending arp-replies to any of them, this
behavior is considered correct and, moreover, it is widely used in the a
dynamic environment as Kubernetes.

https://issues.redhat.com/browse/RHEL-5098
https://gitlab.freedesktop.org/NetworkManager/NetworkManager-ci/-/merge_requests/1587
2024-01-24 09:15:39 -05:00
Wen Liang
cf28660b6a core: check the dhcp enabled flag in l3cfg
The decision to configure or not configure routes without addresses only
related to what method is configured - DHCP and non-DHCP cases. For DHCP
case, the deamon waits until addresses appear first before configuring
the static routes to preserve the behavior mentioned in
https://bugzilla.redhat.com/show_bug.cgi?id=2102212, otherwise, the
daemon can configure the routes immediately for non-DHCP case.
2024-01-24 09:15:39 -05:00
Wen Liang
00c7e4855e l3cfg: add dhcp_enabled_4 and dhcp_enabled_6 properties to NML3ConfigData 2024-01-24 09:15:34 -05:00
Luna Jernberg
7825f53c7c
po: update Swedish (sv) translation
Update Swedish translation for the first time in a while.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1839
2024-01-23 13:51:01 +01:00
Thomas Haller
821710bbaa
libnm: merge branch 'th/setting-no-empty-str-props'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1827
2024-01-23 11:16:04 +01:00
Thomas Haller
955f113f46
libnm/docs: update comment about "apn.gsm" and empty string 2024-01-23 09:43:28 +01:00
Thomas Haller
f766ec0a16
libnm: drop some unnecessary direct_string_allow_empty
"nm_setting_hsr_get_port1" is new API and verify() already enforces that
the strings are not empty. The flag is redundant.

Also drop it from a few other places, where it's redundant.
2024-01-23 09:43:27 +01:00
Thomas Haller
8062d04cd4
libnm: don't set .direct_string_allow_empty for _nm_setting_property_define_direct_mac_address()
Most properties don't accept empty strings and reject them during
verify().

All _nm_setting_property_define_direct_mac_address() call
nm_utils_hwaddr_valid() on the string, which rejects empty strings.

Clear the .direct_string_allow_empty flag for those. The usage of the
flag is misleading.
2024-01-23 09:43:27 +01:00
Thomas Haller
d8e51faee7
libnm: add direct_string_allow_empty meta data for NMSetting property
Most string properties should not accept empty strings. Add a generic
way to reject them during verify.

Add a new flag NMSettInfoProperty.direct_string_allow_empty.

Note that properties must opt-in to allow empty values. Since all
existing properties didn't have this check (but hopefully re-implemented
it in verify()), all existing properties get this flag set to TRUE.

The main point here it that new properties get the strict check by
default.

We should also review existing uses of direct_string_allow_empty,
whether the flag can be cleared. This can be done if verify() already
enforces a non-empty string, or if we accept to break behavior by
tightening up the check.
2024-01-23 09:43:26 +01:00
Thomas Haller
e6abcb4d67
libnm: add generic code for verifying properties in NMSetting
Current verifications happens by implementing NMSetting's verify().
Add code for a second step of validation, that can operate based on the
known type.

The use case will be to reject empty strings.
2024-01-23 09:43:26 +01:00