mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 05:00:15 +01:00
nm-device: clean up IP methods if we lose ifindex
If the ovs interface goes away, the ifindex gets zeroed out and l3cfg is cleaned. We can't follow up with IP configuration. Bad things happen if we try to: #0 0x00007f769734c895 in _g_log_abort (breakpoint=1) at gmessages.c:580 #1 0x00007f769734db98 in g_logv (log_domain=0x55b2472d8840 "nm", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fff4041b9d0) at gmessages.c:1391 #2 0x00007f769734dd63 in g_log (log_domain=log_domain@entry=0x55b2472d8840 "nm", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f769739a620 "%s: assertion '%s' failed") at gmessages.c:1432 #3 0x00007f769734e59d in g_return_if_fail_warning (log_domain=log_domain@entry=0x55b2472d8840 "nm", pretty_function=pretty_function@entry=0x55b2472d5fe0 <__func__.39677> "nm_lndp_ndisc_new", expression=expression@entry=0x55b2472d5fa3 "NM_IS_L3CFG(config->l3cfg)") at gmessages.c:2809 #4 0x000055b2471ce3fa in nm_lndp_ndisc_new (config=config@entry=0x7fff4041bb30) at src/core/ndisc/nm-lndp-ndisc.c:680 #5 0x000055b247123b32 in _dev_ipac6_start (self=self@entry=0x55b248078360 [NMDeviceOvsInterface]) at src/core/devices/nm-device.c:11287 #6 0x000055b2471232f8 in _dev_ipac6_start_continue (self=0x55b248078360 [NMDeviceOvsInterface]) at src/core/devices/nm-device.c:11338 #7 0x000055b2471232f8 in _dev_ipll6_set_llstate (self=0x55b248078360 [NMDeviceOvsInterface], llstate=<optimized out>, lladdr=<optimized out>) at src/core/devices/nm-device.c:10541 #8 0x000055b2471c9e8b in _emit_changed_on_idle_cb (user_data=user_data@entry=0x55b24807bdd0) at src/core/nm-l3-ipv6ll.c:221 #9 0x00007f769734327b in g_idle_dispatch (source=0x55b248119200, callback=0x55b2471c9ce0 <_emit_changed_on_idle_cb>, user_data=0x55b24807bdd0) at gmain.c:5579 #10 0x00007f769734695d in g_main_dispatch (context=0x55b247f56bc0) at gmain.c:3193 #11 0x00007f769734695d in g_main_context_dispatch (context=context@entry=0x55b247f56bc0) at gmain.c:3873 #12 0x00007f7697346d18 in g_main_context_iterate (context=0x55b247f56bc0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3946 #13 0x00007f7697347042 in g_main_loop_run (loop=0x55b247f320f0) at gmain.c:4142 #14 0x000055b246f26b64 in main (argc=<optimized out>, argv=<optimized out>) at src/core/main.c:511 https://bugzilla.redhat.com/show_bug.cgi?id=2012934 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1044 Fixes-test: @ovs_cloned_mac_set_on_iface
This commit is contained in:
parent
bb0a31e6eb
commit
fccb5608f3
1 changed files with 4 additions and 0 deletions
|
|
@ -4053,6 +4053,10 @@ _set_ifindex(NMDevice *self, int ifindex, gboolean is_ip_ifindex)
|
|||
_dev_l3_cfg_commit_type_reset(self);
|
||||
l3cfg_was_reset = TRUE;
|
||||
}
|
||||
if (!priv->l3cfg) {
|
||||
_cleanup_ip_pre(self, AF_INET, CLEANUP_TYPE_KEEP, FALSE);
|
||||
_cleanup_ip_pre(self, AF_INET6, CLEANUP_TYPE_KEEP, FALSE);
|
||||
}
|
||||
|
||||
_LOGD(LOGD_DEVICE,
|
||||
"ifindex: set %sifindex %d%s%s%s%s%s%s",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue