NetworkManager merge requestshttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests2024-03-28T09:58:05Zhttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1906meson: autodetect Qt dependencies2024-03-28T09:58:05ZÍñigo Huguetmeson: autodetect Qt dependencies## Summary
Do not build the Qt examples by default, but only if the dependencies are met.
Also, this fixes some Gitlab-CI failures that happen when generating the tarball
with `make distcheck` or `meson dist`.
## Purpose
Configuring ...## Summary
Do not build the Qt examples by default, but only if the dependencies are met.
Also, this fixes some Gitlab-CI failures that happen when generating the tarball
with `make distcheck` or `meson dist`.
## Purpose
Configuring the build directory with meson often fails if you don't have
meson: autodetect Qt dependencies
Configuring the build directory with meson often fails if you don't have
the right Qt dependencies. As they are used only to build some examples,
it is better to autodetect them and, if present, then build the
examples but skip them otherwise.
Still accept forcing qt=true or qt=false as before.
Note that there is a option type called "feature" whose purpose is to
support exactly this: features with enable/disable/auto possible values:
https://mesonbuild.com/Build-options.html#features. However, they don't
accept true/false values so scripts using qt=true/false would start
failing. Since meson 0.60 the "deprecated" argument can be used for
options (https://mesonbuild.com/Build-options.html#deprecated-options),
but that's a too new version of meson.
Also, this fixes some Gitlab-CI failures that happen when generating the tarball
with `make distcheck` or `meson dist`. This is because it tries to check that
the tarball content can be configured and built, but it uses the default configurations
so it was using `qt=yes`. Now it will use `qt=auto`, avoiding the failure.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.Íñigo HuguetÍñigo Huguethttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1905contrib/rpm: use meson by default for builds on rawhide2024-03-28T09:25:24ZJan Vaclavjvaclav@redhat.comcontrib/rpm: use meson by default for builds on rawhide## Summary
This MR makes it so that meson is used by default to build the specfile on Rawhide (Fedora \>40).
## Purpose
As part of our plan to deprecate autotools, we will now be using meson by default to build NM releases on Rawhide....## Summary
This MR makes it so that meson is used by default to build the specfile on Rawhide (Fedora \>40).
## Purpose
As part of our plan to deprecate autotools, we will now be using meson by default to build NM releases on Rawhide.
## Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1904platform/netlink: use nm_random_get_bytes() for initial seq value2024-03-28T10:39:52ZJan Vaclavjvaclav@redhat.complatform/netlink: use nm_random_get_bytes() for initial seq value## Summary
This MR changes the initial value for `s_seq_expect` to be purely random instead of sourced from the current time.
## Purpose
Coverity warns when a time_t is cast to 32-bits - however, we do not need to use the time here at...## Summary
This MR changes the initial value for `s_seq_expect` to be purely random instead of sourced from the current time.
## Purpose
Coverity warns when a time_t is cast to 32-bits - however, we do not need to use the time here at all, since it is only used as an initializing value that is not expected to be a timestamp.
## Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1903libnm-lldp: use ETH_P_ALL instead of NM_ETHERTYPE_LLDP for the socket2024-03-26T15:58:08ZFernando Fernández Manceralibnm-lldp: use ETH_P_ALL instead of NM_ETHERTYPE_LLDP for the socket## Summary
```
When creating the socket for listening to LLDP frames we are setting
NM_ETHERTYPE_LLDP (0x88cc) as protocol. In most of the cases, that is
correct but when the interface is attached as a port to a OVS bridge,
...## Summary
```
When creating the socket for listening to LLDP frames we are setting
NM_ETHERTYPE_LLDP (0x88cc) as protocol. In most of the cases, that is
correct but when the interface is attached as a port to a OVS bridge,
kernel is not matching the protocol correctly. The reason might be that
some metadata is added to the packet, but we are not completely sure
about it.
Instead, we should use ETH_P_ALL to match all the protocols. Later, we
have a eBPF filter to drop the packet by multicast MAC address or
protocol. This is how lldpd is doing it for example.
```
Fixes: https://issues.redhat.com/browse/RHEL-1418
## Purpose
This is fixing the usage of LLDP when the interface is set as OVS bridge port.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [X] the subject for all commits is concise and explicative
- [X] the message for all commits explains the reason for the change
- [X] the source is properly formatted
- [X] any relevant documentation is up to date
- [X] you have added unit tests if applicable (not unit, but integration!)
- [X] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1902core/logging: remove unused nm_logging_init_pre() function2024-03-27T09:05:49ZJan Vaclavjvaclav@redhat.comcore/logging: remove unused nm_logging_init_pre() function## Summary
This MR removes the `nm_logging_init_pre()` function.
## Purpose
This function is not being used anywhere and is triggering an alert in Coverity scans.
## Checklist
Please read https://gitlab.freedesktop.org/NetworkManage...## Summary
This MR removes the `nm_logging_init_pre()` function.
## Purpose
This function is not being used anywhere and is triggering an alert in Coverity scans.
## Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1901meson: put the documentation included in the tarball in separate folder2024-03-27T15:39:24ZÍñigo Huguetmeson: put the documentation included in the tarball in separate folder## Summary
Put the generated documentation in a different folder of the tarball's root folder,
called docs-dist, instead of putting them in the source tree.
This change fixes the CI failure of the jobs using meson generated tarballs to...## Summary
Put the generated documentation in a different folder of the tarball's root folder,
called docs-dist, instead of putting them in the source tree.
This change fixes the CI failure of the jobs using meson generated tarballs to then
build with autotools.
Additionally, fix the CI failing when doing `meson build` on old meson versions where
that command doesn't exist.
Resolves: https://issues.redhat.com/browse/NMT-1073
## Purpose
We want to distribute the generated documentation when we generate the
tarball because we normally do it when we do a release, but `meson dist`
only includes files that are commited to the repository, so a script
meson-dist-data.sh was added with meson.add_dist_script in commit
1c41066a40d9 ('build: include documentation in meson dist').
This script was copying the whole documentation folders, including some
intermediate files that are not useful for users that wants to read the
docs. Get rid of them and copy only the files that are useful for users:
the generated html pages in docs/api and docs/libnm and the final man
pages.
Also, including these intermediate files caused at least one build
failure, although quite difficult to reproduce:
- Generate tarball with meson
- Untar the generated tarball
- Using the sources from the tarball, configure the project with
autotools, but building to an out-of-tree folder, not building in
the source dir (i.e. using a 'build' subfolder). This is called
a "VPATH build" by autotools and Make. See:
- https://www.gnu.org/software/make/manual/html_node/General-Search.html
- https://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html
- Build
In that scenario, we get an error trying to generate any file under man/
because the man/ subdirectory has not been created. The reason of this
was that the man/ subdirectory is created by the Makefile when
generating the file man/common.ent. However, this file was present in
the source directory because it has been included in the tarball, so
Make detects it and doesn't run the rules to generate it. The result is
that out-of-tree-dir/man folder is not created.
Not including the intermediate files would solve this problem. Anyway,
it is also a good idea to save the generated docs to a new folder,
called docs-dist, that is not used in any part of the build process, so
we ensure even more that this kind of situations doesn't happen again.
Additionally, fix the CI failing when doing `meson build` on old meson versions where
that command doesn't exist. `ninja dist` has to be used instead.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.Íñigo HuguetÍñigo Huguethttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1900update DocBook DTD version to latest stable 4.52024-03-26T17:41:30ZTomasz Kłoczkoupdate DocBook DTD version to latest stable 4.5## Summary
Update DocBook DTD version to latest stable 4.5
## Purpose
it allows cut off tail of older DTDs which needs to be installed in build env.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManag...## Summary
Update DocBook DTD version to latest stable 4.5
## Purpose
it allows cut off tail of older DTDs which needs to be installed in build env.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [ ] any relevant documentation is up to date
- [ ] you have added unit tests if applicable
- [ ] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1899Fix detection of 6 GHz band capability for WiFi devices2024-03-22T13:29:40ZBeniamino GalvaniFix detection of 6 GHz band capability for WiFi devices## Summary
Fix a couple of bugs that prevented the correct detection of 6 GHz band capability for WiFi devices, visible with `nmcli -f wifi-properties.6ghz device show $DEV`
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/...## Summary
Fix a couple of bugs that prevented the correct detection of 6 GHz band capability for WiFi devices, visible with `nmcli -f wifi-properties.6ghz device show $DEV`
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1500
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1898device: ignore error setting mac if it's a global special value2024-03-28T08:46:09ZBeniamino Galvanidevice: ignore error setting mac if it's a global special value## Summary
If the distro sets a global special value for the cloned MAC address
(for example, `stable-ssid`) and the driver doesn't support changing
the MAC, all activations will fail on the interface unless users know
that they need to...## Summary
If the distro sets a global special value for the cloned MAC address
(for example, `stable-ssid`) and the driver doesn't support changing
the MAC, all activations will fail on the interface unless users know
that they need to change the cloned MAC. Be more tolerant to errors in
case the MAC is global and special.
https://bugzilla.redhat.com/show_bug.cgi?id=2270062
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicable
- [x] the NEWS file is updated when the change deserves to be mentioned, for example for new features, behavior changes, API deprecations, etc.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1895ethtool: support Forward Error Correction(fec)2024-03-28T15:21:39ZGris Geethtool: support Forward Error Correction(fec)Introducing support of ethtool fec.
D-BUS API: `fec: uint32_t`.
nmcli: `ethtool.fec` allowing values are any combinations of:
* auto
* off
* rs
* baser
* llrs
* arbitrary uint32_t (will show as hex format)
Reso...Introducing support of ethtool fec.
D-BUS API: `fec: uint32_t`.
nmcli: `ethtool.fec` allowing values are any combinations of:
* auto
* off
* rs
* baser
* llrs
* arbitrary uint32_t (will show as hex format)
Resolves: https://issues.redhat.com/browse/RHEL-24055https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1888nmcli: fix bash completion for fields2024-03-18T15:48:53ZFilip Pokryvkanmcli: fix bash completion for fields## Summary
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....## Summary
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.
## Purpose
Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=2115827
## Checklist
Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [ ] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1879Systemd security settings2024-03-26T15:43:49ZRahul SundaramSystemd security settings## Summary
As part of https://fedoraproject.org/wiki/Changes/SystemdSecurityHardening which has been approved for Fedora 40, I am working on updating Systemd services to add additional hardening settings, please review this PR and let m...## Summary
As part of https://fedoraproject.org/wiki/Changes/SystemdSecurityHardening which has been approved for Fedora 40, I am working on updating Systemd services to add additional hardening settings, please review this PR and let me know if you have any feedback
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html has detailed information on each of these settings including the version of Systemd where they were introduced.
## Purpose
Improve sandboxing
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [x] any relevant documentation is up to date
- [x] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1857Draft: Fix some issue when building with eBPF support2024-03-06T10:17:08ZBeniamino GalvaniDraft: Fix some issue when building with eBPF support## Summary
This fixes some issues found when trying to build and use NM with eBPF support.
## Purpose
eBPF support is used by ACD to filter ARP packets we are interested in, which means that the daemon doesn't have to be awakened when...## Summary
This fixes some issues found when trying to build and use NM with eBPF support.
## Purpose
eBPF support is used by ACD to filter ARP packets we are interested in, which means that the daemon doesn't have to be awakened when the packet is not related to our addresses. By enabling it, the operation becomes more efficient and NM will use less CPU in environment with many ARP requests.https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1843Draft: added oci provider2024-03-26T00:24:29ZDipen KhatriDraft: added oci provider## Summary
Oracle cloud infrastructure (OCI) provider that supports secondary VNIC
## Purpose
OCI wants to add a provider like other cloud providers added to network manager
## Checklist
Please read
https://gitlab.freedesktop.org/Ne...## Summary
Oracle cloud infrastructure (OCI) provider that supports secondary VNIC
## Purpose
OCI wants to add a provider like other cloud providers added to network manager
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [ Y ] the subject for all commits is concise and explicative
- [ Y ] the message for all commits explains the reason for the change
- [ Y ] the source is properly formatted
- [ Y ] any relevant documentation is up to date
- [ N ] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1830wwan/ofono: handle disconnect while activating connection2024-03-06T10:17:10ZRatchanan Srirattanametwwan/ofono: handle disconnect while activating connection## Summary
Handle the case where, while we're waiting for oFono to activate a context, the GPRS call become un-attached.
## Purpose
If not handled, the device will stuck in prepare state forever, which causes the phone to stay unconne...## Summary
Handle the case where, while we're waiting for oFono to activate a context, the GPRS call become un-attached.
## Purpose
If not handled, the device will stuck in prepare state forever, which causes the phone to stay unconnected to mobile data until the user manually toggle data connection off and on at oFono level.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [x] the subject for all commits is concise and explicative
- [x] the message for all commits explains the reason for the change
- [x] the source is properly formatted
- [ ] any relevant documentation is up to date
- [ ] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1825Draft: First attempt (Fixed #1395)2024-03-16T21:30:10ZAlexander LochmannDraft: First attempt (Fixed #1395)## Summary
Fixes #1395
## Purpose
Treat Wireguard also as VPN.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check...## Summary
Fixes #1395
## Purpose
Treat Wireguard also as VPN.
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [ ] the subject for all commits is concise and explicative
- [ ] the message for all commits explains the reason for the change
- [ ] the source is properly formatted
- [ ] any relevant documentation is up to date
- [ ] you have added unit tests if applicable
## Notes
This is my first attempt. I'm still trying to understand NM, and looking for an optimal solution. `nm_connection_is_vpn_a()` is just a temp name until I know a better one.
@thaller @ihuguet Any thoughts on the direction this is going?https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1816Draft: Captive Portal URI handling [RFC8910]2024-03-06T10:17:22ZSandro PischingerDraft: Captive Portal URI handling [RFC8910]## Summary
This merge request adds support for handling a Captive Portal Identification. This includes reading the captive portal url from dhcp options and router advertisements.
partially resolves https://gitlab.freedesktop.org/Network...## Summary
This merge request adds support for handling a Captive Portal Identification. This includes reading the captive portal url from dhcp options and router advertisements.
partially resolves https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1305
This is a draft for now in order to get feedback during development. Feel free to reply below.
## Purpose
The purpose of this change is to be able receiving RFC8910 DHCP options/RA and provide that information to the user or other mechanisms like the captive portal api (RFC 8908).
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [ ] the subject for all commits is concise and explicative
- [ ] the message for all commits explains the reason for the change
- [ ] the source is properly formatted
- [ ] any relevant documentation is up to date
- [ ] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1707connection: add keyfile documentation section for connection2023-10-20T11:02:23ZFernando Fernández Manceraconnection: add keyfile documentation section for connection## Summary
Add connection setting section to keyfile documentation. This documentation can be checked with `man 5 nm-settings-keyfile`
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CO...## Summary
Add connection setting section to keyfile documentation. This documentation can be checked with `man 5 nm-settings-keyfile`
## Checklist
Please read
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md
before opening the merge request. In particular, check that:
- [X] the subject for all commits is concise and explicative
- [X] the message for all commits explains the reason for the change
- [X] the source is properly formatted
- [X] any relevant documentation is up to date
- [X] you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1673Ease migration to FHS' 3.0 /run directory2023-07-25T13:37:45ZLuciano Santosluc14n0@opensuse.orgEase migration to FHS' 3.0 /run directory## Summary
Add build option to switch from `/var/run` (`$localstatedir/run`) to `/run`, if wanted, but still defaulting to `/var/run`, for the time being at least.
## Purpose
Present a migration path to distributions seeking to comply...## Summary
Add build option to switch from `/var/run` (`$localstatedir/run`) to `/run`, if wanted, but still defaulting to `/var/run`, for the time being at least.
## Purpose
Present a migration path to distributions seeking to comply with FHS 3.0 (and further). More specifically regarding to the `/run` directory, where its dedicated [chapter](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html#runPurpose), in the standard, states:
> The purposes of this directory were once served by `/var/run`. In general, programs may continue to use `/var/run` to fulfill the requirements set out for `/run` for the purposes of backwards compatibility. Programs which have migrated to use `/run` should cease their usage of `/var/run`, except as noted in the section on `/var/run`.
And the [chapter](https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html#purpose46) dedicated to `/var/run`:
> This directory was once intended for system information data describing the system since it was booted. These functions have been moved to `/run`; this directory exists to ensure compatibility with systems and software using an older version of this specification.
---
Besides, the **Autotools**' `configure.ac` provides the `--with-runstatedir` / `--runstatedir` options:
``` sh
AC_ARG_WITH([runstatedir],
AS_HELP_STRING([--with-runstatedir=DIR],
[Directory for /var/run. Defaults to $localstatedir/run. In autoconf >= 2.70, you should instead use --runstatedir option. This option takes precedence over --runstatedir.]),
[runstatedir="$withval"])
AS_IF([test -z "$runstatedir"], runstatedir="$localstatedir/run")
AC_SUBST(runstatedir)
```
As an alternative, making the option a string to be passed to `meson` rather than a boolean would also suffice, if it's more desirable.
---
**openSUSE**, as other major Linux distributions, uses a `/var/run -> /run` symlink and lately we introduced a patch to force **Meson** to use `/run` - because of the lack of a build option/switch - and we haven't run into trouble, as far as I can tell.
## Checklist
x - the subject for all commits is concise and explicative
x - the message for all commits explain the reason for the change
x - the source is properly formatted
x - any relevant documentation is up to date
x - you have added unit tests if applicablehttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1663adding flags to IP addresses2023-09-25T09:22:13Zreal xiaoyangadding flags to IP addressesAdding "flags" to IP addresses is passed through DBUS, making it easier for upper level applications to distinguish between temporary addresses,local link addresses, and ipv6 addresses
Only the changes in the src/core/NetworkManagerUtil...Adding "flags" to IP addresses is passed through DBUS, making it easier for upper level applications to distinguish between temporary addresses,local link addresses, and ipv6 addresses
Only the changes in the src/core/NetworkManagerUtils. c file are necessary. The reason for the changes may be multiple IP addresses, and DBUS callers need to distinguish between these IPs (temporary IP, local IP, etc.). After adding "n_ifa_flags", the caller can distinguish different types of IPs through "n_ifa_flags".
For example, using ifconfig can see multiple IPv6 addresses, but the NetworkManager caller cannot distinguish between these IP addresses.
The following is the execution result of 'ifconfig':
```
wlx200db01ffe4c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.8.204 netmask 255.255.255.0 broadcast 192.168.8.255
inet6 fd5c:78f8:7354:6f00:c390:656f:edc4:72bf prefixlen 64 scopeid 0x0<global>
inet6 2408:8411:9068:b5a:fc84:cada:c3e6:48ff prefixlen 64 scopeid 0x0<global>
inet6 2408:8411:9068:b5a:5c78:f873:546f:2 prefixlen 128 scopeid 0x0<global>
inet6 fe80::45e9:5fd6:2ca7:1d38 prefixlen 64 scopeid 0x20<link>
inet6 fd5c:78f8:7354:6f00:fc84:cada:c3e6:48ff prefixlen 64 scopeid 0x0<global>
inet6 2408:8411:9068:b5a:4bb0:82f3:8795:e09c prefixlen 64 scopeid 0x0<global>
ether 20:0d:b0:1f:fe:4c txqueuelen 1000 (以太网)
RX packets 110 bytes 25381 (25.3 KB)
RX errors 0 dropped 62 overruns 0 frame 0
TX packets 205 bytes 40495 (40.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```