NetworkManager/src
Thomas Haller 31ca7962f8 device: don't evaluate IP config changes until device is initialized
The unmanaged flags PLATFORM_INIT indicates whether UDEV is done
initializing the device. We should not handle IP config changes
before that pointer.

This avoids codepaths that require the permanent MAC address of the
device. We should not freeze the permanent MAC address before
UDEV initialized the device, for two reasons:

- getting the permanent MAC address using ethtool is racy as
  UDEV might still rename the interface.
- freezing a fake permanent MAC address should only happen after
  UDEV is done configuring the MAC address of software devices.

    #0  0x000055555568bc7a in nm_device_update_permanent_hw_address (self=self@entry=0x555555f0fb70 [NMDeviceVeth], force_freeze=force_freeze@entry=1) at src/devices/nm-device.c:11817
    #1  0x000055555568c443 in nm_device_get_permanent_hw_address_full (self=self@entry=0x555555f0fb70 [NMDeviceVeth], force_freeze=force_freeze@entry=1, out_is_fake=out_is_fake@entry=0x0)
        at src/devices/nm-device.c:12227
    #2  0x000055555568cb06 in nm_device_get_permanent_hw_address (self=self@entry=0x555555f0fb70 [NMDeviceVeth]) at src/devices/nm-device.c:12237
    #3  0x000055555568cb50 in spec_match_list (self=0x555555f0fb70 [NMDeviceVeth], specs=0x555555a5c000 = {...}) at src/devices/nm-device.c:12294
    #4  0x00005555556a4ee6 in spec_match_list (device=0x555555f0fb70 [NMDeviceVeth], specs=0x555555a5c000 = {...}) at src/devices/nm-device-ethernet.c:1461
    #5  0x00005555556978db in nm_device_spec_match_list (self=self@entry=0x555555f0fb70 [NMDeviceVeth], specs=0x555555a5c000 = {...}) at src/devices/nm-device.c:12277
    #6  0x000055555558e187 in _match_section_infos_lookup (match_section_infos=0x555555a5d500, keyfile=0x555555a46f80, property=property@entry=0x555555793123 "ipv4.route-metric", device=device@entry=0x555555f0fb70 [NMDeviceVeth], out_value=out_value@entry=0x7fffffffe018) at src/nm-config-data.c:1169
    #7  0x00005555555922ca in nm_config_data_get_connection_default (self=0x555555a548c0 [NMConfigData], property=property@entry=0x555555793123 "ipv4.route-metric", device=device@entry=0x555555f0fb70 [NMDeviceVeth]) at src/nm-config-data.c:1234
    #8  0x00005555556790cd in _get_ipx_route_metric (self=self@entry=0x555555f0fb70 [NMDeviceVeth], is_v4=is_v4@entry=1) at src/devices/nm-device.c:1142
    #9  0x000055555567912e in nm_device_get_ip4_route_metric (self=self@entry=0x555555f0fb70 [NMDeviceVeth]) at src/devices/nm-device.c:1161
    #10 0x000055555567da6c in ip4_config_merge_and_apply (self=self@entry=0x555555f0fb70 [NMDeviceVeth], config=config@entry=0x0, commit=commit@entry=0, out_reason=out_reason@entry=0x0)
        at src/devices/nm-device.c:4787
    #11 0x000055555567e0fb in update_ip4_config (self=self@entry=0x555555f0fb70 [NMDeviceVeth], initial=initial@entry=0) at src/devices/nm-device.c:9532
    #12 0x0000555555693acd in queued_ip4_config_change (user_data=0x555555f0fb70) at src/devices/nm-device.c:9651
    #13 0x00007ffff4c966ba in g_main_context_dispatch (context=0x555555a46af0) at gmain.c:3154
    #14 0x00007ffff4c966ba in g_main_context_dispatch (context=context@entry=0x555555a46af0) at gmain.c:3769
    #15 0x00007ffff4c96a70 in g_main_context_iterate (context=0x555555a46af0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3840
    #16 0x00007ffff4c96d92 in g_main_loop_run (loop=0x555555a47400) at gmain.c:4034
    #17 0x000055555558372a in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:411
2016-10-28 16:44:57 +02:00
..
devices device: don't evaluate IP config changes until device is initialized 2016-10-28 16:44:57 +02:00
dhcp-manager dhcp: make default dhcp plugin configurable at compile-time 2016-10-27 11:28:01 +02:00
dns-manager core: introduce default logging macros 2016-10-14 15:57:43 +02:00
dnsmasq-manager build: merge "src/dnsmasq-manager/tests/Makefile.am" into toplevel Makefile 2016-10-21 17:04:06 +02:00
platform platform/tests: relax assertion for expected link-changed signal 2016-10-24 15:15:15 +02:00
ppp-manager build: merge "src/ppp-manager/Makefile.am" into toplevel Makefile 2016-10-19 17:16:08 +02:00
rdisc build: merge "src/rdisc/tests/Makefile.am" into toplevel Makefile 2016-10-21 17:04:06 +02:00
settings device: treat fake permanent MAC address mostly like a real one 2016-10-28 16:44:56 +02:00
supplicant-manager build: merge "src/supplicant-manager/tests/Makefile.am" into toplevel Makefile 2016-10-21 17:04:06 +02:00
systemd systemd: merge branch systemd into master 2016-10-24 17:39:38 +02:00
tests src/tests: relax assertion for test_nm_utils_monotonic_timestamp_as_boottime() 2016-10-24 15:27:31 +02:00
vpn-manager src: drop generated nm-src-enum-types.h 2016-10-22 17:16:17 +02:00
main-utils.c main: create /run/NetworkManager/devices runtime directory 2016-09-26 10:52:12 +02:00
main-utils.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
main.c build: don't add systemd path the include search path 2016-09-27 14:13:21 +02:00
NetworkManager.ver ifcfg-rh: support the autoconnect-retries property 2016-10-16 12:56:09 +02:00
NetworkManagerUtils.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
NetworkManagerUtils.h utils: inject platform into nm_utils_complete_generic() 2016-03-15 12:56:58 +01:00
nm-act-request.c core: rename "nm-activation-request.[hc]" for NMActRequest 2016-10-03 12:04:49 +02:00
nm-act-request.h core: rename "nm-activation-request.[hc]" for NMActRequest 2016-10-03 12:04:49 +02:00
nm-active-connection.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-active-connection.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-audit-manager.c config: print default value for logging.audit 2016-10-11 11:29:52 +02:00
nm-audit-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-auth-manager.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-auth-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-auth-subject.c src: drop generated nm-src-enum-types.h 2016-10-22 17:16:17 +02:00
nm-auth-subject.h auth: embed private data NMAuthSubjectPrivate in NMAuthSubject struct 2016-05-12 10:24:36 +02:00
nm-auth-utils.c core: fix builds without polkit support 2016-08-17 11:28:55 +02:00
nm-auth-utils.h all: move NM_AUTH_PERMISSION_* defines to "nm-common-macros.h" header 2016-06-01 19:06:35 +02:00
nm-bus-manager.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-bus-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-checkpoint-manager.c checkpoint: introduce new flags to better restore previous state 2016-10-24 09:57:18 +02:00
nm-checkpoint-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-checkpoint.c checkpoint: introduce new flags to better restore previous state 2016-10-24 09:57:18 +02:00
nm-checkpoint.h checkpoint: introduce new flags to better restore previous state 2016-10-24 09:57:18 +02:00
nm-config-data.c config: fix printing default values for missing sections 2016-10-11 11:29:52 +02:00
nm-config-data.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-config.c device: treat fake permanent MAC address mostly like a real one 2016-10-28 16:44:56 +02:00
nm-config.h core: persist the fake permanent hardware address to the device's statefile 2016-10-28 16:44:56 +02:00
nm-connectivity.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-connectivity.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-core-utils.c libnm-core/utils: update hwaddr utilities 2016-10-28 16:28:29 +02:00
nm-core-utils.h build: merge "src/tests/Makefile.am" into toplevel Makefile 2016-10-21 17:04:06 +02:00
nm-dcb.c all: cleanup includes and let "nm-default.h" include "config.h" 2016-02-19 17:53:25 +01:00
nm-dcb.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-default-route-manager.c core: don't use generated glib enum for platform types 2016-10-22 17:16:17 +02:00
nm-default-route-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp4-config.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp4-config.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp6-config.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dhcp6-config.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-dispatcher.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-dispatcher.h src: Fixes to add Proxy Feature 2016-10-04 11:44:44 +02:00
nm-exported-object.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-exported-object.h core: refactor private data for NMExportedObject and others 2016-10-03 12:04:14 +02:00
nm-firewall-manager.c core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-firewall-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-iface-helper.c build: buld nm-dhcp-manager.c as part of libNetworkMangerBase 2016-10-22 17:55:15 +02:00
nm-ip4-config.c ip-config: cleanup integer types for nm_ip4_config_get_num_*() 2016-10-14 06:18:43 +02:00
nm-ip4-config.h ip-config: cleanup integer types for nm_ip4_config_get_num_*() 2016-10-14 06:18:43 +02:00
nm-ip6-config.c ip-config: cleanup integer types for nm_ip4_config_get_num_*() 2016-10-14 06:18:43 +02:00
nm-ip6-config.h ip-config: cleanup integer types for nm_ip4_config_get_num_*() 2016-10-14 06:18:43 +02:00
nm-logging.c logging: protect VPN_PLUGIN logging domain 2016-10-11 11:29:52 +02:00
nm-logging.h core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-manager.c device: delay evaluating unmanaged-by-user-settings flags until link initialized 2016-10-28 16:44:57 +02:00
nm-manager.h core: allow passing an applied connection to nm_act_request_new() 2016-09-26 15:10:39 +02:00
nm-multi-index.c all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-multi-index.h all: cleanup includes in header files 2016-08-17 19:51:17 +02:00
nm-pacrunner-manager.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-pacrunner-manager.h proxy: rename NMPacRunnerManager to NMPacrunnerManager 2016-10-04 12:14:15 +02:00
nm-policy.c core: handle the autoconnect-retries property 2016-10-16 12:56:09 +02:00
nm-policy.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-proxy-config.c proxy: reorder parts in nm-proxy-config.c and nm-pacrunner-manager.c 2016-10-04 11:58:32 +02:00
nm-proxy-config.h proxy: remove unnecessary APIs 2016-10-04 11:44:44 +02:00
nm-rfkill-manager.c logging: remove LOGD_HW alias for LOGD_PLATFORM 2016-10-11 11:29:52 +02:00
nm-rfkill-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-route-manager.c core: don't use generated glib enum for platform types 2016-10-22 17:16:17 +02:00
nm-route-manager.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-session-monitor.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-session-monitor.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-sleep-monitor.c core: introduce default logging macros 2016-10-14 15:57:43 +02:00
nm-sleep-monitor.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-test-utils-core.h shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-types.h proxy: rename NMPacRunnerManager to NMPacrunnerManager 2016-10-04 12:14:15 +02:00
org.freedesktop.NetworkManager.conf dns: use DBus to make dnsmasq nameserver changes 2016-04-21 15:32:07 +02:00