NetworkManager/src/core
Beniamino Galvani 6af2fb351c core, libnm: expose the reason for unmanaged devices
A common source for doubts and questions from users is about why
devices are unmanaged. Unfortunately NM doesn't expose that
information properly via D-Bus and so it's not available in nmcli.

The device D-Bus object has two properties that are strictly related:
"state" and "state-reason". The latter represents the reason for the
current state. Introduce new reasons to indicate the possible causes
for the unmanaged state. Note that a device can be unmanaged because
of multiple reasons at the same time, we only return one.

Before:

  $ nmcli -f GENERAL.DEVICE,GENERAL.TYPE,GENERAL.STATE,GENERAL.reason device show

  GENERAL.DEVICE:                         enp7s0
  GENERAL.TYPE:                           ethernet
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         0 (No reason given)

  GENERAL.DEVICE:                         tun0
  GENERAL.TYPE:                           tun
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         0 (No reason given)

  GENERAL.DEVICE:                         hwsim0
  GENERAL.TYPE:                           unknown
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         0 (No reason given)

After:

  $ nmcli -f GENERAL.DEVICE,GENERAL.TYPE,GENERAL.STATE,GENERAL.reason device show

  GENERAL.DEVICE:                         enp7s0
  GENERAL.TYPE:                           ethernet
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         76 (The device is unmanaged by user decision via settings plugin ("unmanaged-devices" for keyfile or "NM_CONTROLLED=no" for ifcfg-rh))

  GENERAL.DEVICE:                         tun0
  GENERAL.TYPE:                           tun
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         75 (The device is unmanaged by explicit user decision (e.g. 'nmcli device set $DEV managed no')

  GENERAL.DEVICE:                         hwsim0
  GENERAL.TYPE:                           unknown
  GENERAL.STATE:                          10 (unmanaged)
  GENERAL.REASON:                         69 (The device is unmanaged because the device type is unmanaged by default)

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1887
2024-03-20 15:25:09 +01:00
..
devices core, libnm: expose the reason for unmanaged devices 2024-03-20 15:25:09 +01:00
dhcp ip: support dhcp-send-release in NMSettingIpConfig 2024-03-06 11:14:16 +01:00
dns libnm: implement "{ipv4,ipv6}.dns-options" as direct STRV property 2023-11-23 17:19:10 +01:00
dnsmasq all: ensure signendess for arguments of NM_{MIN,MAX,CLAMP}() macros matches 2023-08-07 09:24:36 +02:00
ndisc ndisc: fix IPv6 address lifetimes computation 2024-02-20 11:19:48 +01:00
platform test: disable vlan_xgress unit test 2024-02-26 14:43:24 +01:00
ppp ppp: fix plugin name for "rp-pppoe.so" with ppp 2.5 2023-06-14 14:27:25 +02:00
settings 802.1x: add openssl_ciphers setting 2024-03-16 21:30:34 +01:00
supplicant 802.1x: add openssl_ciphers setting 2024-03-16 21:30:34 +01:00
tests config/tests: fix test failure in "/config/set-values" 2024-02-09 08:27:41 +00:00
vpn vpn: accept pref-src for IPv6 routes returned by plugins 2024-01-29 08:54:08 +01:00
main-utils.c core: Fix unextractable translation string 2023-12-18 15:53:16 +01:00
main-utils.h core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01:00
main.c core/dbus: "RequestName" of NetworkManager D-Bus API later to fix race 2023-03-23 13:06:57 +01:00
meson.build power: rename NMSleepMonitor to NMPowerMonitor 2024-03-04 18:29:07 +01:00
NetworkManagerUtils.c libnm: use nm_setting_connection_get_controller() where possible 2024-03-12 09:54:31 +01:00
NetworkManagerUtils.h core: add nm_match_spec_device_data_init_from_platform() helper 2023-06-14 11:07:34 +02:00
nm-act-request.c core: propagate the user-requested reason for act-request disconnection 2023-10-27 18:02:50 +02:00
nm-act-request.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-active-connection.c core: deprecate master in NMActiveConnection internal API 2024-03-13 18:24:47 +01:00
nm-active-connection.h core: deprecate master in NMActiveConnection internal API 2024-03-13 18:24:47 +01:00
nm-audit-manager.c core: ignore unused result warning of audit_log_user_message() 2024-02-09 08:27:41 +00:00
nm-audit-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-manager.c all: fix deprecated function declaration without a prototype 2022-10-11 17:21:11 +02:00
nm-auth-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-auth-utils.c core: avoid getpwuid() unless necessary in permission check 2023-11-14 10:35:12 +01:00
nm-auth-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-bond-manager.c bond: don't configure "counter" on nft rules for slb-bonding/mlag 2023-05-10 19:03:40 +02:00
nm-bond-manager.h core: add NMBondManager to handle NTF rules for balance-slb (MLAG) 2022-10-04 12:37:41 +02:00
nm-checkpoint-manager.c core: use nm_dbus_manager_lookup_object_with_type() 2022-03-13 12:02:08 +01:00
nm-checkpoint-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-checkpoint.c checkpoint: Allow rollback on internal global DNS 2024-03-13 20:52:37 +08:00
nm-checkpoint.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-config-data.c checkpoint: Allow rollback on internal global DNS 2024-03-13 20:52:37 +08:00
nm-config-data.h checkpoint: Allow rollback on internal global DNS 2024-03-13 20:52:37 +08:00
nm-config.c core: persist state of software generic devices across restarts 2024-02-21 11:16:05 +01:00
nm-config.h core: persist state of software generic devices across restarts 2024-02-21 11:16:05 +01:00
nm-connectivity.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nm-connectivity.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-core-utils.c device: fix generated 'wifi.cloned-mac-address="stable-ssid"' for stable-id 2023-12-13 09:05:15 +01:00
nm-core-utils.h device: fix generated 'wifi.cloned-mac-address="stable-ssid"' for stable-id 2023-12-13 09:05:15 +01:00
nm-dbus-manager.c all: use NM_MIN() instead of MIN() 2023-11-15 09:32:20 +01:00
nm-dbus-manager.h core/dbus: split RequestName D-Bus call out of initialization for NMDBusManager 2023-03-23 13:06:57 +01:00
nm-dbus-object.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-object.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dbus-utils.c dbus: add helper macros for GDBusAnnotationInfo 2024-01-16 09:28:17 +01:00
nm-dbus-utils.h dbus: add helper macros for GDBusAnnotationInfo 2024-01-16 09:28:17 +01:00
nm-dcb.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dcb.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-default-daemon.h libnm: move nm-errors.h include away from nm-connection.h 2022-11-13 23:36:37 +01:00
nm-dhcp-config.c all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dhcp-config.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-dispatcher.c device: support creating generic devices via device-handler 2024-02-21 11:16:05 +01:00
nm-dispatcher.h dispatcher: read device-handler's stdout into a dictionary 2024-02-21 11:16:04 +01:00
nm-firewall-utils.c all: replace NMP_IFNAMSIZ with NM_IFNAMSIZ 2023-05-30 08:51:10 +02:00
nm-firewall-utils.h bond: don't configure "counter" on nft rules for slb-bonding/mlag 2023-05-10 19:03:40 +02:00
nm-firewalld-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewalld-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-hostname-manager.c hostname: combine implementations of read_hostname() for Gentoo and Slackware 2023-02-08 09:51:25 +01:00
nm-hostname-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-ip-config.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-ip-config.h core: rate-limit updates to IP addresses/routes on D-Bus API 2023-11-30 15:41:43 +01:00
nm-keep-alive.c doc: replace all (allow-none) annotations by (optional) and/or (nullable) 2023-03-27 11:49:43 +02:00
nm-keep-alive.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-l3-config-data.c l3cfg: add dhcp_enabled_4 and dhcp_enabled_6 properties to NML3ConfigData 2024-01-24 09:15:34 -05:00
nm-l3-config-data.h l3cfg: add dhcp_enabled_4 and dhcp_enabled_6 properties to NML3ConfigData 2024-01-24 09:15:34 -05:00
nm-l3-ipv4ll.c all: use NM_HASH_SEED_16() macro 2023-11-14 14:15:42 +01:00
nm-l3-ipv4ll.h all: fix various "-Wcast-align=strict" warnings 2022-12-09 09:15:56 +01:00
nm-l3-ipv6ll.c core: improve logging of used IPv6 interface identifier 2023-05-19 12:51:58 +02:00
nm-l3-ipv6ll.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-l3cfg.c l3cfg: fix handling of ipv6 hop limit 2024-03-12 09:58:28 +01:00
nm-l3cfg.h core/trivial: fix typo in code comment 2023-10-19 16:31:31 +02:00
nm-manager.c ovs: Do not allow OVS bridge and port to be parent 2024-03-15 16:12:37 +08:00
nm-manager.h checkpoint: Allow rollback on internal global DNS 2024-03-13 20:52:37 +08:00
nm-netns.c netns: schedule a commit when a single-hop route is merged 2023-12-04 17:00:13 +01:00
nm-netns.h core: remove unused tag-less API from nm_netns_watcher*() 2023-03-21 15:58:46 +01:00
nm-pacrunner-manager.c glib-aux: rename IP address related helpers from "nm-inet-utils.h" 2022-08-25 19:05:51 +02:00
nm-pacrunner-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-policy.c libnm: use nm_setting_connection_get_controller() where possible 2024-03-12 09:54:31 +01:00
nm-policy.h core: expose and rename nm_policy_device_recheck_auto_activate_schedule() 2023-04-27 08:35:27 +02:00
nm-power-monitor.c connection: add support to down-on-poweroff 2024-03-04 18:16:54 +00:00
nm-power-monitor.h connection: add support to down-on-poweroff 2024-03-04 18:16:54 +00:00
nm-priv-helper-call.c nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-priv-helper-call.h nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-rfkill-manager.c platform: remove CSME related code 2023-09-25 11:46:24 +00:00
nm-rfkill-manager.h platform: remove CSME related code 2023-09-25 11:46:24 +00:00
nm-session-monitor.c all: prefer nm wrappers to automatically attach GSource to default context 2022-03-13 11:59:42 +01:00
nm-session-monitor.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-test-utils-core.h all: replace NMP_IFNAMSIZ with NM_IFNAMSIZ 2023-05-30 08:51:10 +02:00
nm-types.h power: rename NMSleepMonitor to NMPowerMonitor 2024-03-04 18:29:07 +01:00
org.freedesktop.NetworkManager.conf all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
README.l3cfg.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00
README.next.ip-config.md core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00

core

The source code of the NetworkManager daemon.

NetworkManager is a daemon that provides a D-Bus API and a file-based API for configuring the network on a Linux host.

This is the daemon source code.