NetworkManager merge requestshttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests2021-11-14T20:25:25Zhttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1027dhcp: schedule a timeout when starting the client2021-11-14T20:25:25ZBeniamino Galvanidhcp: schedule a timeout when starting the client'no_lease_timeout' is the timeout to get the initial lease and to
renew it once it was lost. It should be scheduled when the client is
started.
(Note: the first 3 commits in this branch are from !1026)'no_lease_timeout' is the timeout to get the initial lease and to
renew it once it was lost. It should be scheduled when the client is
started.
(Note: the first 3 commits in this branch are from !1026)https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1026next: fix @bridge_down_to_l2_only test2021-11-17T10:21:02ZBeniamino Galvaninext: fix @bridge_down_to_l2_only testFix renewing a DHCP lease after it was lost.Fix renewing a DHCP lease after it was lost.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1025device: set ip_state to PENDING when cleaning up from reapply2021-11-14T20:19:57ZFernando Fernández Manceradevice: set ip_state to PENDING when cleaning up from reapplyWhen the device is configure to use dhcp/autoconf, the state must be
expanded to ip_state. In addition, if one of the IP configuration is
ready and the other may fail, then we should consider it ready. The
other ip state does not matter ...When the device is configure to use dhcp/autoconf, the state must be
expanded to ip_state. In addition, if one of the IP configuration is
ready and the other may fail, then we should consider it ready. The
other ip state does not matter at all, it can be none too.
Fixes-test: @nmcli_device_reapply_routeshttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1024spec: Update for backwards compatibility2021-11-17T10:05:27ZAna Cabralspec: Update for backwards compatibilityhttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1023[Testing Only] fix: NMCI failures in ipv4_ignore_resolveconf_with_ignore_auto...2021-11-18T15:27:48ZWen Liang[Testing Only] fix: NMCI failures in ipv4_ignore_resolveconf_with_ignore_auto_dnsSigned-off-by: Wen Liang <liangwen12year@gmail.com>Signed-off-by: Wen Liang <liangwen12year@gmail.com>https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1022l3cfg: do not add dependent routes for non-default routes2021-11-12T14:30:45ZFernando Fernández Manceral3cfg: do not add dependent routes for non-default routesWhen the route is not a default route 0.0.0.0/0, NetworkManager should
not add dependent routes.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>When the route is not a default route 0.0.0.0/0, NetworkManager should
not add dependent routes.
Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1021po: Update and fix Simplified Chinese translation2021-11-30T09:56:49ZFeralMeowpo: Update and fix Simplified Chinese translationhttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1020[th/clang-format-13] format: reformat source tree with clang-format 13.02021-11-29T09:35:20ZThomas Haller[th/clang-format-13] format: reformat source tree with clang-format 13.0We use clang-format for automatic formatting of our source files.
Since clang-format is actively maintained software, the actual
formatting depends on the used version of clang-format. That is
unfortunate and painful, but really unavoida...We use clang-format for automatic formatting of our source files.
Since clang-format is actively maintained software, the actual
formatting depends on the used version of clang-format. That is
unfortunate and painful, but really unavoidable unless clang-format
would be strictly bug-compatible.
So the version that we must use is from the current Fedora release, which
is also tested by our gitlab-ci. Previously, we were using Fedora 34 with
clang-tools-extra-12.0.1-1.fc34.x86_64.
As Fedora 35 comes along, we need to update our formatting as Fedora 35
comes with version "13.0.0~rc1-1.fc35".
An alternative would be to freeze on version 12, but that has different
problems (like, it's cumbersome to rebuild clang 12 on Fedora 35 and it
would be cumbersome for our developers which are on Fedora 35 to use a
clang that they cannot easily install).
The (differently painful) solution is to reformat from time to time, as we
switch to a new Fedora (and thus clang) version.
Usually we would expect that such a reformatting brings minor changes.
But this time, the changes are huge. That is mentioned in the release
notes [1] as
> Makes PointerAligment: Right working with AlignConsecutiveDeclarations. (Fixes https://llvm.org/PR27353)
[1] https://releases.llvm.org/13.0.0/tools/clang/docs/ReleaseNotes.html#clang-formathttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1019wip: extend dhcp conf2021-11-09T11:51:33ZFernando Fernández Mancerawip: extend dhcp confSigned-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1018IPv6 fixes for next branch2021-11-09T22:19:22ZBeniamino GalvaniIPv6 fixes for next branchThis fixes test `@keep_external_routes`.This fixes test `@keep_external_routes`.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1017iwd: P2P support2022-01-21T10:37:52ZAndrew Zaborowskiiwd: P2P supportThis mostly adds the `NMDeviceIwdP2P` class and supporting code and basically enables gnome-network-displays to work against the IWD backend, although with a small change for which I submitted an issue to that project. It also won't act...This mostly adds the `NMDeviceIwdP2P` class and supporting code and basically enables gnome-network-displays to work against the IWD backend, although with a small change for which I submitted an issue to that project. It also won't actually work with IWD's `NetworkConfigurationEnabled` option, which is always enabled for P2P (where IWD obtains the IP config details, runs DHCP etc.), some work has been done to support this but isn't finished yet. It was enough for me to be able to test the code though.
Note it looks like the clang formatter isn't indenting this line correctly: https://gitlab.freedesktop.org/balrog-kun/NetworkManager/-/commit/50bada3caccd58cc30eb7c3c3d688220fd6b44fc#144942d40ee55666557c4b5770207604540b303b_0_584
Also NM's clang-format config apparently breaks with clang-format-13, I needed to revert to clang-format-12 after an upgrade.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1016[Testing Only] NMCI: fix test failure in nmcli general set device unmanaged2021-11-10T14:01:42ZWen Liang[Testing Only] NMCI: fix test failure in nmcli general set device unmanagedSigned-off-by: Wen Liang <liangwen12year@gmail.com>Signed-off-by: Wen Liang <liangwen12year@gmail.com>https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1015device: fix wrong assignment in ip_state_other comparison2021-11-05T17:03:21ZFernando Fernández Manceradevice: fix wrong assignment in ip_state_other comparisonFixes: 0b05c5adb4b ('device: fail when a addr family fails and the other is disabled')Fixes: 0b05c5adb4b ('device: fail when a addr family fails and the other is disabled')https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1014Allow building with clang + lto2022-01-20T09:20:51ZTom StellardAllow building with clang + ltoThe configure script was requiring the -flto-partition in order to build with
lto, but this is a gcc-specific flag.
I had to write my own code to detect clang as the compiler. There is also a macro for this: https://www.gnu.org/softwar...The configure script was requiring the -flto-partition in order to build with
lto, but this is a gcc-specific flag.
I had to write my own code to detect clang as the compiler. There is also a macro for this: https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html#ax_compiler_vendor but I wasn't sure if using these ax_* macros was allowed in the source.
This problem was reported an issue #593. With this patch the configure script succeeds, but the build fails with this error:
/usr/bin/ld: /tmp/lto-llvm-0f3f19.o: in function `nm_device_get_metered':
/builddir/build/BUILD/NetworkManager-1.32.12/src/libnm-client-impl/nm-device.c:2198: multiple definition of `nm_device_get_metered'
/usr/bin/ld: /tmp/lto-llvm-0f3f19.o: in function `nm_access_point_get_last_seen':
/builddir/build/BUILD/NetworkManager-1.32.12/src/libnm-client-impl/nm-access-point.c:231: multiple definition of `nm_access_point_get_last_s
/usr/bin/ld: /tmp/lto-llvm-0f3f19.o: in function `nm_device_wifi_request_scan_options':
/builddir/build/BUILD/NetworkManager-1.32.12/src/libnm-client-impl/nm-device-wifi.c:305: multiple definition of `nm_device_wifi_request_scan
/usr/bin/ld: /tmp/lto-llvm-0f3f19.o: in function `nm_device_wifi_request_scan_options_async':
/builddir/build/BUILD/NetworkManager-1.32.12/src/libnm-client-impl/nm-device-wifi.c:379: multiple definition of `nm_device_wifi_request_scan
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
It appears that this problem is related to the use of the NM_BACKPORT_SYMBOL macro which also seems to have caused an issue with gcc LTO see issue #63.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1013Draft: [next] Fix 802.1X tests2021-11-09T12:33:47ZBeniamino GalvaniDraft: [next] Fix 802.1X testshttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1012[lr/pc] a couple of pkg-config changes2021-11-15T08:29:21ZLubomir Rintel[lr/pc] a couple of pkg-config changesRemove NetworkManager.pc, carry useful stuff over to libnm.pc.Remove NetworkManager.pc, carry useful stuff over to libnm.pc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1011ip4-config: preserve infinite lifetimes when merging addresses2022-01-18T14:54:57ZLubomir Rintelip4-config: preserve infinite lifetimes when merging addressesWhen an address from DHCP is being added, while a same address with src
kernel exists, the lifetime from former is used, because it's presumably
more accurate.
This causes trouble when the connection has a manually set address and
gets ...When an address from DHCP is being added, while a same address with src
kernel exists, the lifetime from former is used, because it's presumably
more accurate.
This causes trouble when the connection has a manually set address and
gets the same one from DHCP. Initially, a manually set address (with src
user and permanent lifetime) would take precedence. However, after the
restart the address would be discovered with src kernel and as soon as a
DHCP lease is renewed its lifetime would be lowered.
I'm not entirely sure this is the right solution, but preventing
tampering from permanent lifetimes seems to do the trick.
https://bugzilla.redhat.com/show_bug.cgi?id=2013921https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1010initrd: don't add a connection if there's a connection dir with rd.neednet2022-02-08T08:55:34ZLubomir Rintelinitrd: don't add a connection if there's a connection dir with rd.neednetOnly create a default connection with rd.neednet if we're starting with
a totally blank slate. Otherwise it could be that the user already
included configuration in the initrd and merely wants us to activate it.
https://gitlab.freedeskt...Only create a default connection with rd.neednet if we're starting with
a totally blank slate. Otherwise it could be that the user already
included configuration in the initrd and merely wants us to activate it.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/999https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1009policy: send ip configs to the DNS manager earlier2021-11-02T11:44:16ZLubomir Rintelpolicy: send ip configs to the DNS manager earlierDon't wait until the device is ACTIVATED -- pass them as soon as they're
valid. They should be applied at the moment the device enters ACTIVATED
state.
https://bugzilla.redhat.com/show_bug.cgi?id=2006677Don't wait until the device is ACTIVATED -- pass them as soon as they're
valid. They should be applied at the moment the device enters ACTIVATED
state.
https://bugzilla.redhat.com/show_bug.cgi?id=2006677https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1008core: support linking with LLD 132021-11-02T11:43:40ZHarald van Dijkcore: support linking with LLD 13LLD 13 adds `-z start-stop-gc` and makes it the default, resulting in:
```
CCLD src/core/NetworkManager-all-sym
ld.lld: error: undefined symbol: __stop_connection_defaults
>>> referenced by nm-config.c:0 (src/core/nm-config.c:0)
>...LLD 13 adds `-z start-stop-gc` and makes it the default, resulting in:
```
CCLD src/core/NetworkManager-all-sym
ld.lld: error: undefined symbol: __stop_connection_defaults
>>> referenced by nm-config.c:0 (src/core/nm-config.c:0)
>>> libNetworkManager_la-nm-config.o:(read_config) in archive src/core/.libs/libNetworkManager.a
>>> referenced by nm-config-data.c:1598 (src/core/nm-config-data.c:1598)
>>> libNetworkManager_la-nm-config-data.o:(nm_config_data_get_connection_default) in archive src/core/.libs/libNetworkManager.a
>>> referenced by nm-config-data.c:0 (src/core/nm-config-data.c:0)
>>> libNetworkManager_la-nm-config-data.o:(nm_config_data_get_connection_default) in archive src/core/.libs/libNetworkManager.a
ld.lld: error: undefined symbol: __start_connection_defaults
>>> referenced by nm-config.c:0 (src/core/nm-config.c:0)
>>> libNetworkManager_la-nm-config.o:(read_config) in archive src/core/.libs/libNetworkManager.a
>>> referenced by nm-config.c:0 (src/core/nm-config.c:0)
>>> libNetworkManager_la-nm-config.o:(read_config) in archive src/core/.libs/libNetworkManager.a
>>> referenced by nm-config.c:0 (src/core/nm-config.c:0)
>>> libNetworkManager_la-nm-config.o:(read_config) in archive src/core/.libs/libNetworkManager.a
>>> referenced 2 more times
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
Add `__attribute__((__retain__))` to prevent GC of the connection
defaults.