NetworkManager/src/core
Beniamino Galvani 164591f754 settings: preserve existing connection flags on update
We are passing to the plugin only 'sett_flags', which is the bitmask
of flags to change and works together with 'sett_mask'; however,
plugins interpret that value as the new flags value. The result is
that if there is no change needed (0/0), the existing flags are lost.
Simple reproducer:

  ip link add dummy1 type dummy
  ip link set dummy1 up
  ip addr add dev dummy1 fd01::12/64
  sleep 1

  # now, a external connection is created by NM

  echo "BEFORE:"
  cat /run/NetworkManager/system-connections/dummy1.nmconnection | grep "nm-generated\|volatile\|external"

  # just add a new address to the interface to make it lose
  # the external flag

  ip addr add dev dummy1 172.25.42.1/24
  sleep 1

  echo "AFTER:"
  cat /run/NetworkManager/system-connections/dummy1.nmconnection | grep "nm-generated\|volatile\|external"

Output:

  BEFORE:
  nm-generated=true
  volatile=true
  external=true
  AFTER:

Fixes: d35d3c468a ('settings: rework tracking settings connections and settings plugins')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1548
(cherry picked from commit 86b922695f)
(cherry picked from commit 4353f84230)
2023-03-02 11:25:39 +01:00
..
devices device: skip DNS resolution for tentative IPv6 addresses 2023-02-22 15:04:06 +01:00
dhcp dhcp: add the DHCPv6 IAID to the lease information 2023-02-21 09:46:39 +01:00
dns dns: consider the dns-type and the priority when hashing DNS configs 2023-02-09 19:59:42 +01:00
dnsmasq all: avoid using global string buffer for to-string methods 2022-04-08 15:59:49 +02:00
ndisc ndisc/tests: fix reference counting in nm_fake_ndisc_new() 2023-01-11 10:04:57 +01:00
platform platform: fix nmp_lookup_init_route_by_weak_id() to honor the route-table 2023-01-26 09:22:43 +01:00
ppp ppp,wwan: remove explicit initialization of DNS priority 2022-07-18 07:48:13 +02:00
settings settings: preserve existing connection flags on update 2023-03-02 11:25:39 +01:00
supplicant macsec: allow CKN shorter than 64 characters 2022-12-05 17:15:06 +01:00
tests all: reformat with clang-format (clang-tools-extra-14.0.0-1.fc36) and update gitlab-ci to f36 2022-07-06 11:06:53 +02:00
vpn core: increase l3cfg merge priority for VPN config 2022-02-01 19:22:02 +01:00
main-utils.c core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +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: support "nm.debug" kernel command line to enable verbose logging 2022-07-18 15:00:04 +02:00
meson.build dns/unbound: drop deprecated "unbound" DNS plugin 2022-04-15 09:04:30 +02:00
NetworkManagerUtils.c core: set routing rule protocol properly 2022-11-14 22:46:04 +01:00
NetworkManagerUtils.h core: increase NM_SHUTDOWN_TIMEOUT_MAX_MSEC to 5 sec to cover pppd 2022-02-24 09:38:53 +01:00
nm-act-request.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-act-request.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-active-connection.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-active-connection.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-audit-manager.c audit: handle error from audit_encode_nv_string() 2022-05-11 17:06:12 +02:00
nm-audit-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-utils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-auth-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 settings-connection: add a "plugin" argument to Update2() 2022-03-28 13:29:28 +02:00
nm-checkpoint.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config-data.c core/config: use NM_STR_HAS_PREFIX() instead of g_str_has_prefix() 2022-09-09 16:27:00 +02:00
nm-config-data.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config.c config: fix a reversed conditional 2023-01-26 09:22:43 +01:00
nm-config.h core: support "nm.debug" kernel command line to enable verbose logging 2022-07-18 15:00:04 +02:00
nm-connectivity.c curl: use CURLOPT_PROTOCOLS_STR instead of deprecated CURLOPT_PROTOCOLS 2023-01-26 09:22:43 +01:00
nm-connectivity.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-core-utils.c core: print stderr from nm-daemon-helper 2023-02-22 15:01:52 +01:00
nm-core-utils.h core: fix enum argument in prototype of nm_utils_kill_process_sync(), etc. 2023-01-26 09:22:43 +01:00
nm-dbus-manager.c core: add nm_dbus_manager_lookup_object_with_type() helper 2022-03-13 12:02:07 +01:00
nm-dbus-manager.h core: add nm_dbus_manager_lookup_object_with_type() helper 2022-03-13 12:02:07 +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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-utils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-utils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 build: move "shared/nm-{glib-aux,log-null,log-core}" to "src/libnm-{glib-aux,log-null,log-core}" 2021-02-24 12:48:20 +01:00
nm-dhcp-config.c core: add nm_dhcp_config_get_option_values() 2022-05-03 09:08:16 +02:00
nm-dhcp-config.h core: add nm_dhcp_config_get_option_values() 2022-05-03 09:08:16 +02:00
nm-dispatcher.c dispatcher: log duration of dispatcher call 2022-06-09 13:23:35 +02:00
nm-dispatcher.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewall-utils.c firewall: pass "--wait 2" to iptables to wait for concurrent invocations 2023-01-16 10:22:05 +01:00
nm-firewall-utils.h firewall: expose nm_firewall_nft_call() in header file 2022-09-29 13:51:57 +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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-hostname-manager.c core: fix unused variable in _write_hostname_on_idle_cb() 2022-05-30 18:46:40 +02:00
nm-hostname-manager.h core/hostname: avoid blocking calls in NMHostnameManager setting static hostname 2022-05-30 16:56:38 +02:00
nm-ip-config.c core: rename and move nm_ip_config_dns_hash() 2023-02-09 19:58:30 +01:00
nm-ip-config.h core: rename and move nm_ip_config_dns_hash() 2023-02-09 19:58:30 +01:00
nm-keep-alive.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-keep-alive.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-l3-config-data.c dns: consider the dns-type and the priority when hashing DNS configs 2023-02-09 19:59:42 +01:00
nm-l3-config-data.h dns: consider the dns-type and the priority when hashing DNS configs 2023-02-09 19:59:42 +01:00
nm-l3-ipv4ll.c platform: rename nmp_lookup_init_object() to nmp_lookup_init_object_by_ifindex() 2022-06-30 14:08:41 +02:00
nm-l3-ipv4ll.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-l3-ipv6ll.c platform: rename nmp_lookup_init_object() to nmp_lookup_init_object_by_ifindex() 2022-06-30 14:08:41 +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 core: fix setting IPv6 retrans timer 2022-11-03 20:54:12 +01:00
nm-l3cfg.h platform: rename NMPRouteManager to NMPGlobalTracker 2022-07-26 12:43:44 +02:00
nm-manager.c core: log when dynamic IP configuration is restarted and why 2022-08-25 23:24:46 +02:00
nm-manager.h core: add nm_manager_get_dns_manager() getter 2022-04-15 09:04:30 +02:00
nm-netns.c core: fix returning invalid pointer from nm_netns_l3cfg_get() 2022-12-16 15:25:02 +01:00
nm-netns.h platform: rename NMPRouteManager to NMPGlobalTracker 2022-07-26 12:43:44 +02:00
nm-pacrunner-manager.c core: use NM_SHUTDOWN_TIMEOUT_1500_MSEC 2022-02-24 09:38:53 +01:00
nm-pacrunner-manager.h core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
nm-policy.c device: improve logging for hostname-from-dns events 2023-02-22 15:01:51 +01:00
nm-policy.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01: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 core: export radio flags 2022-03-29 09:34:07 +02:00
nm-rfkill-manager.h core: export radio flags 2022-03-29 09:34:07 +02: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: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-sleep-monitor.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-sleep-monitor.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-test-utils-core.h all: avoid using global string buffer for to-string methods 2022-04-08 15:59:49 +02:00
nm-types.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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.