mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 06:10:14 +01:00
device: fix capture of device config in ipX_config_merge_and_apply()
Use nm_device_get_ip_ifindex() to obtain the right ifindex for the device. Fixes the following: nm_platform_ip4_address_get_all: assertion 'ifindex > 0' failed #0 _g_log_abort () from target:/lib64/libglib-2.0.so.0 #1 g_logv () from target:/lib64/libglib-2.0.so.0 #2 g_log () from target:/lib64/libglib-2.0.so.0 #3 nm_platform_ip4_address_get_all (self=self@entry=0x1181020, ifindex=ifindex@entry=0) at src/platform/nm-platform.c:2640 #4 nm_ip4_config_capture (platform=0x1181020, ifindex=ifindex@entry=0, capture_resolv_conf=capture_resolv_conf@entry=0) at src/nm-ip4-config.c:271 #5 ip4_config_merge_and_apply (self=self@entry=0x1254a70, config=config@entry=0x0, commit=commit@entry=1) at src/devices/nm-device.c:5447 #6 activate_stage5_ip4_config_commit (self=0x1254a70) at src/devices/nm-device.c:8299 #7 activation_source_handle_cb (self=0x1254a70, family=family@entry=2) at src/devices/nm-device.c:4421 #8 activation_source_handle_cb4 (user_data=<optimized out>) at src/devices/nm-device.c:4358 #9 g_idle_dispatch () from target:/lib64/libglib-2.0.so.0 #10 g_main_context_dispatch () from target:/lib64/libglib-2.0.so.0 #11 g_main_context_iterate.isra () from target:/lib64/libglib-2.0.so.0 #12 g_main_loop_run () from target:/lib64/libglib-2.0.so.0 #13 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:435 Fixes:a21b8882cc(cherry picked from commit6389d637a7)
This commit is contained in:
parent
cb5ba08f00
commit
4b6955095b
1 changed files with 2 additions and 2 deletions
|
|
@ -5492,7 +5492,7 @@ ip4_config_merge_and_apply (NMDevice *self,
|
|||
if (priv->queued_ip4_config_id) {
|
||||
g_clear_object (&priv->ext_ip4_config);
|
||||
priv->ext_ip4_config = nm_ip4_config_capture (nm_device_get_platform (self),
|
||||
nm_device_get_ifindex (self),
|
||||
nm_device_get_ip_ifindex (self),
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
|
@ -6236,7 +6236,7 @@ ip6_config_merge_and_apply (NMDevice *self,
|
|||
g_clear_object (&priv->ext_ip6_config);
|
||||
g_clear_object (&priv->ext_ip6_config_captured);
|
||||
priv->ext_ip6_config_captured = nm_ip6_config_capture (nm_device_get_platform (self),
|
||||
nm_device_get_ifindex (self),
|
||||
nm_device_get_ip_ifindex (self),
|
||||
FALSE,
|
||||
NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN);
|
||||
if (priv->ext_ip6_config_captured)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue