NetworkManager/src/core
Beniamino Galvani 9d60cd2813
dhcp: fix crash accepting leases without addresses
For IPv6 the lease doesn't necessarily have an address. If the address
is missing or the DHCP client doesn't implement accept(), we don't
need to wait for the address in platform.

From https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1066#note_1233210 :

  0  0x00007ffff760f88c in __pthread_kill_implementation () at /lib64/libc.so.6
  1  0x00007ffff75c26a6 in raise () at /lib64/libc.so.6
  2  0x00007ffff75ac7d3 in abort () at /lib64/libc.so.6
  3  0x00007ffff77c5d4c in g_assertion_message (domain=<optimized out>, file=<optimized out>, line=<optimized out>, func=<optimized out>, message=<optimized out>)
      at ../glib/gtestutils.c:3223
  4  0x00007ffff782645f in g_assertion_message_expr
      (domain=domain@entry=0x5555559e7c96 "nm", file=file@entry=0x5555559deac0 "src/core/dhcp/nm-dhcp-client.c", line=line@entry=609, func=func@entry=0x5555559e0090 <__func__.31> "l3_cfg_notify_cb", expr=expr@entry=0x5555559df5cf "lease_address") at ../glib/gtestutils.c:3249
  5  0x00005555558b2866 in l3_cfg_notify_cb (l3cfg=0x555555c29790, notify_data=<optimized out>, self=0x555555e9a1b0) at src/core/dhcp/nm-dhcp-client.c:609
  9  0x00007ffff791abe3 in <emit signal ??? on instance ???> (instance=instance@entry=0x555555c29790, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553
      6  0x00007ffff78fcc7f in g_closure_invoke (closure=0x555555ca3900, return_value=0x0, n_param_values=2, param_values=0x7fffffffd420, invocation_hint=0x7fffffffd3a0)
      at ../gobject/gclosure.c:830
      7  0x00007ffff7919106 in signal_emit_unlocked_R
      (node=node@entry=0x555555bbadc0, detail=detail@entry=0, instance=instance@entry=0x555555c29790, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd420) at ../gobject/gsignal.c:3742
      8  0x00007ffff791a9ca in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd5f0)
      at ../gobject/gsignal.c:3497
  10 0x000055555564c8a6 in _nm_l3cfg_emit_signal_notify (self=self@entry=0x555555c29790, notify_data=notify_data@entry=0x7fffffffdf30) at src/core/nm-l3cfg.c:576
  11 0x000055555564ce77 in _nm_l3cfg_emit_signal_notify_simple (self=self@entry=0x555555c29790, notify_type=notify_type@entry=NM_L3_CONFIG_NOTIFY_TYPE_POST_COMMIT)
      at src/core/nm-l3cfg.c:585
  12 0x0000555555656082 in _l3_commit (self=self@entry=0x555555c29790, commit_type=NM_L3_CFG_COMMIT_TYPE_UPDATE, commit_type@entry=NM_L3_CFG_COMMIT_TYPE_AUTO, is_idle=is_idle@entry=1)
      at src/core/nm-l3cfg.c:4201
  13 0x0000555555656189 in _l3_commit_on_idle_cb (user_data=user_data@entry=0x555555c29790) at src/core/nm-l3cfg.c:2961
  14 0x00007ffff77f847b in g_idle_dispatch (source=0x555555d65680, callback=0x55555565612c <_l3_commit_on_idle_cb>, user_data=0x555555c29790) at ../glib/gmain.c:5897
  15 0x00007ffff77fc130 in g_main_dispatch (context=0x555555aa5020) at ../glib/gmain.c:3381
  16 g_main_context_dispatch (context=0x555555aa5020) at ../glib/gmain.c:4099
  17 0x00007ffff7851208 in g_main_context_iterate.constprop.0 (context=0x555555aa5020, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
  18 0x00007ffff77fb853 in g_main_loop_run (loop=0x555555aa5970) at ../glib/gmain.c:4373
  19 0x0000555555593c56 in main (argc=<optimized out>, argv=<optimized out>) at src/core/main.c:509

Fixes: e1648d0665 ('core: commit l3cd asynchronously on DHCP bound event')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1074
2022-01-27 22:17:46 +01:00
..
devices dhcp: fix crash accepting leases without addresses 2022-01-27 22:17:46 +01:00
dhcp dhcp: fix crash accepting leases without addresses 2022-01-27 22:17:46 +01:00
dns dns: better track l3cd changes 2022-01-26 14:54:52 +01:00
dnsmasq format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
ndisc format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
platform format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
ppp format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
settings keyfile: for keyfile owner check allow root and euid 2022-01-18 18:10:56 +01:00
supplicant supplicant: use nm_ref_string_reset_str() in _properties_changed_main() 2022-01-27 19:04:44 +01:00
tests format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
vpn format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 Remove check for running as root, but keep translations 2022-01-18 17:30:45 +01:00
meson.build nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
NetworkManagerUtils.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
NetworkManagerUtils.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 build: allow configuring default for wifi.backend setting 2022-01-04 06:41:37 +01: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-config.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-connectivity.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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: make nm_utils_get_nm_[ug]id() thread safe 2022-01-18 18:21:02 +01:00
nm-core-utils.h core: move nm_main_utils_get_nm_[ug]id() to "nm-core-utils.h" 2022-01-18 18:10:55 +01:00
nm-dbus-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dbus-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-dhcp-config.h core: rework IP configuration in NetworkManager using layer 3 configuration 2021-11-18 16:21:29 +01:00
nm-dispatcher.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-firewall-utils.h firewall: add special firewall-backend "none" 2021-05-14 11:41:33 +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: ensure static-hostname is valid UTF-8 2022-01-10 20:43:17 +01:00
nm-hostname-manager.h core: rename related things explicitly to "static-hostname" 2022-01-10 20:43:17 +01:00
nm-ip-config.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-ip-config.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 core: support compare flags in nm_l3_config_data_cmp_full() 2022-01-26 14:54:51 +01:00
nm-l3-config-data.h core: support compare flags in nm_l3_config_data_cmp_full() 2022-01-26 14:54:51 +01:00
nm-l3-ipv4ll.c ipv4ll: fix assert on external LL address removal 2022-01-12 14:58:29 +01:00
nm-l3-ipv4ll.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-l3-ipv6ll.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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: on n-acd instance-reset clear also ready ACD state 2022-01-19 13:37:30 +01:00
nm-l3cfg.h nm-device: prefer manually configured addresses to automatic 2021-12-01 15:04:16 +01:00
nm-manager.c nm-sudo: rename to nm-priv-helper 2022-01-11 21:46:55 +01:00
nm-manager.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-netns.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-netns.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-pacrunner-manager.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 core: update hostname once at startup 2022-01-26 14:54:52 +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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-rfkill-manager.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-session-monitor.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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 format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00: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.