1. 20 Jan, 2022 4 commits
  2. 18 Jan, 2022 1 commit
    • Beniamino Galvani's avatar
      core: commit l3cd asynchronously on DHCP bound event · 650df01c
      Beniamino Galvani authored
      When a lease is obtained, currently NMDevice performs a synchronous
      commit of IP configuration and then accepts the lease.
      
      Instead, let NMDevice only schedule a async commit; when the DHCP
      client notices that the new address was committed it will
      automatically accept it and emit a new signal so that the device can
      succeed the activation.
      
      Sync commits should be avoided because a commit does of things which
      are outside the control of the caller (see the comment in
      nm_device_l3cfg_commit()). Furthermore, when there are many pending
      activations, async commits seem to help in reducing the CPU usage.
      650df01c
  3. 14 Jan, 2022 1 commit
  4. 13 Jan, 2022 5 commits
  5. 12 Jan, 2022 12 commits
    • Thomas Haller's avatar
      0cfaa631
    • Beniamino Galvani's avatar
      core: set force-commit flag for generated routes · ae28d225
      Beniamino Galvani authored
      The force-commit flag is used to force the commit of an address or a
      route from DHCP/RA even when it was removed from platform externally
      (for example because it expired). Routes generated from the l3cd
      should also have the flag set.
      
      Without this, NM properly re-adds the DHCP address after the lease is
      lost and obtained again, but fails to add the prefix-route.
      
      Fixes: 2838b1c5 ('core: track force-commit flag for l3cd and platform objects')
      
      https://bugzilla.redhat.com/show_bug.cgi?id=2033991
      !1049
      ae28d225
    • Lubomir Rintel's avatar
      ipv4ll: fix assert on external LL address removal · 3e12c6ff
      Lubomir Rintel authored
      Consider externally removed IPv4LL bad, proceed as if a collision was
      detected. Otherwise we trip an assert:
      
        <trace> [1641816260.3963] l3cfg[b8bf8cd16ec4732e,ifindex=47]: emit signal (platform-change-on-idle, obj-type-flags=0x14)
        **
        nm:ERROR:src/core/nm-l3-ipv4ll.c:888:_ipv4ll_state_change: code should not be reached
        Aborted (core dumped)
      
        #3  0x00007f41621d020e in g_assertion_message_expr (domain=domain@entry=0x5559cd829140 "nm",
            file=file@entry=0x5559cd823e51 "src/core/nm-l3-ipv4ll.c",
            line=line@entry=888, func=func@entry=0x5559cd824d30 <__func__.38810> "_ipv4ll_state_change",
            expr=expr@entry=0x0) at gtestutils.c:2556
        #4  0x00005559cd719686 in _ipv4ll_state_change (self=0x5559cef886c0,
            is_on_idle_handler=0) at src/core/nm-l3-ipv4ll.c:888
        #8  0x00007f41626a5093 in <emit signal ??? on instance 0x5559ceffaa30 [NML3Cfg]>
            (instance=instance@entry=0x5559ceffaa30, signal_id=<optimized out>,
             detail=detail@entry=0) at gsignal.c:3448
        #9  0x00005559cd511a03 in _nm_l3cfg_emit_signal_notify
            (self=self@entry=0x5559ceffaa30 [NML3Cfg], notify_data=notify_data@entry=0x7ffd1caa8640)
            at src/core/nm-l3cfg.c:576
        #10 0x00005559cd5122dc in _nm_l3cfg_emit_signal_notify_acd_event (self=0x5559ceffaa30 [NML3Cfg],
            acd_data=<optimized out>) at src/core/nm-l3cfg.c:2008
        #11 0x00005559cd512463 in _nm_l3cfg_emit_signal_notify_acd_event_all
            (self=0x5559ceffaa30 [NML3Cfg]) at src/core/nm-l3cfg.c:2041
        #12 0x00005559cd5194ef in _l3_acd_nacd_event (fd=<optimized out>, condition=<optimized out>,
            user_data=<optimized out>) at src/core/nm-l3cfg.c:1536
        #13 0x00007f41621a895d in g_main_dispatch (context=0x5559ceec8bc0) at gmain.c:3193
        #14 0x00007f41621a895d in g_main_context_dispatch (context=context@entry=0x5559ceec8bc0)
            at gmain.c:3873
        #15 0x00007f41621a8d18 in g_main_context_iterate (context=0x5559ceec8bc0, block=block@entry=1,
            dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3946
        #16 0x00007f41621a9042 in g_main_loop_run (loop=0x5559ceea40f0) at gmain.c:4142
        #17 0x00005559cd47c7a4 in main (argc=<optimized out>, argv=<optimized out>)
            at src/core/main.c:511
      
      https://bugzilla.redhat.com/show_bug.cgi?id=2028404
      !1059
      3e12c6ff
    • Thomas Haller's avatar
      3b2c42b5
    • Thomas Haller's avatar
      platform: log when blocking poll() returns for reading netlink socket · 56a051de
      Thomas Haller authored
      Try to debug a hang in platform code, presumably during poll().
      This logging seems useful for debugging this particular issue,
      but it might be useful in general.
      56a051de
    • Thomas Haller's avatar
    • Thomas Haller's avatar
      platform/trivial: rename "now_ns" to "now_nsec" · a79efac2
      Thomas Haller authored
      I was already doing such renaming at various places. Let's be consistent
      and clear. It was (slightly) confusing was "ns" means.
      a79efac2
    • Thomas Haller's avatar
      abf39ed0
    • Thomas Haller's avatar
      platform: fix type for timestamp in delayed_action_wait_for_nl_response_complete_check() · 65cdbd35
      Thomas Haller authored
      Fixes: d074ffc8 ('platform: refactor completing netlink responses in event_handler_read_netlink()')
      65cdbd35
    • Thomas Haller's avatar
      build/autotools: fix linking libnm-log-null into various executables · c434ca66
      Thomas Haller authored and Beniamino Galvani's avatar Beniamino Galvani committed
      Interestingly, on RHEL9 I suddenly get a linker error:
      
        libtool: link: gcc -Wall -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wundef -Wvla -Wno-duplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-array-bounds -Wunused-value -Wcast-function-type -Wimplicit-fallthrough -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--version-script=./linker-script-binary.ver -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -o src/nm-online/.libs/nm-online src/nm-online/nm_online-nm-online.o -Wl,--export-dynamic -pthread  src/libnm-client-impl/.libs/libnm.so src/libnm-client-aux-extern/.libs/libnm-client-aux-extern.a /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-client-impl/.libs/libnm.so -lgnutls -ludev src/libnm-glib-aux/.libs/libnm-glib-aux.a src/libnm-std-aux/.libs/libnm-std-aux.a src/c-siphash/.libs/libc-siphash.a -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread
        /usr/bin/ld: src/libnm-glib-aux/.libs/libnm-glib-aux.a(libnm_glib_aux_la-nm-time-utils.o): in function `_t_init_global_state':
        /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-glib-aux/nm-time-utils.c:73: undefined reference to `_nm_utils_monotonic_timestamp_initialized'
        collect2: error: ld returned 1 exit status
        make[2]: *** [Makefile:11437: src/nm-online/nm-online] Error 1
      
      The linker is right. Fix it.
      
      (cherry picked from commit f21340ab)
      c434ca66
    • Ana Cabral's avatar
      core/ovs: fix setting dpdk-devargs JSON to NULL · 1d2ee780
      Ana Cabral authored and Beniamino Galvani's avatar Beniamino Galvani committed
      NMSettingOvsDpdk does not have a verify() implementation that would prevent
      the devargs property from being NULL. We must thus anticipate and handle
      a NULL value.
      
      Fixes: ae415212 ('ovs/ovsdb: add support for setting dpdk devargs option')
      (cherry picked from commit d6395f7e)
      1d2ee780
    • Thomas Haller's avatar
      bluetooth: fix invalid assertion in NMBluezManager:dispose() · fb0fb695
      Thomas Haller authored and Beniamino Galvani's avatar Beniamino Galvani committed
      We need to first free "priv->bzobjs", which then will unlink all bzobjs
      from the lists. The assert needs to go after.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=2028427
      
      Fixes: 4154d961 ('bluetooth: refactor BlueZ handling and let NMBluezManager cache ObjectManager data')
      (cherry picked from commit d5f917e7)
      fb0fb695
  6. 11 Jan, 2022 10 commits
    • Beniamino Galvani's avatar
      nm-sudo: rename to nm-priv-helper · 6074ab1e
      Beniamino Galvani authored
      The name "nm-sudo" reminds of the "sudo" tool, and this is a bit
      confusing because it's not related. Rename the service to
      "nm-priv-helper", which stands for "NM privileged helper".
      
      !938
      (cherry picked from commit d68ab6b8)
      6074ab1e
    • Thomas Haller's avatar
      build/autotools: fix linking libnm-log-null into various executables · f21340ab
      Thomas Haller authored
      Interestingly, on RHEL9 I suddenly get a linker error:
      
        libtool: link: gcc -Wall -Werror -Wextra -Wdeclaration-after-statement -Wfloat-equal -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wpointer-arith -Wshadow -Wshift-negative-value -Wstrict-prototypes -Wundef -Wvla -Wno-duplicate-decl-specifier -Wno-format-truncation -Wno-format-y2k -Wno-missing-field-initializers -Wno-pragmas -Wno-sign-compare -Wno-unknown-pragmas -Wno-unused-parameter -Wno-array-bounds -Wunused-value -Wcast-function-type -Wimplicit-fallthrough -fno-strict-aliasing -fdata-sections -ffunction-sections -Wl,--gc-sections -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,--version-script=./linker-script-binary.ver -Wl,-z -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -o src/nm-online/.libs/nm-online src/nm-online/nm_online-nm-online.o -Wl,--export-dynamic -pthread  src/libnm-client-impl/.libs/libnm.so src/libnm-client-aux-extern/.libs/libnm-client-aux-extern.a /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-client-impl/.libs/libnm.so -lgnutls -ludev src/libnm-glib-aux/.libs/libnm-glib-aux.a src/libnm-std-aux/.libs/libnm-std-aux.a src/c-siphash/.libs/libc-siphash.a -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -pthread
        /usr/bin/ld: src/libnm-glib-aux/.libs/libnm-glib-aux.a(libnm_glib_aux_la-nm-time-utils.o): in function `_t_init_global_state':
        /root/NetworkManager/contrib/fedora/rpm/NetworkManager.20220111-121006.2X0NXg/BUILD/NetworkManager-1.35.3/src/libnm-glib-aux/nm-time-utils.c:73: undefined reference to `_nm_utils_monotonic_timestamp_initialized'
        collect2: error: ld returned 1 exit status
        make[2]: *** [Makefile:11437: src/nm-online/nm-online] Error 1
      
      The linker is right. Fix it.
      f21340ab
    • Beniamino Galvani's avatar
      nm-sudo: rename to nm-priv-helper · d68ab6b8
      Beniamino Galvani authored
      The name "nm-sudo" reminds of the "sudo" tool, and this is a bit
      confusing because it's not related. Rename the service to
      "nm-priv-helper", which stands for "NM privileged helper".
      
      !938
      d68ab6b8
    • Beniamino Galvani's avatar
      supplicant: enable SAE-H2E · 9f3d2a09
      Beniamino Galvani authored
      H2E (hash to element) is a newer method for generating the PWE
      (password element) for SAE, alternative to the existing
      "hunting-and-pecking". It is considered more secure and it is
      mandatory for the WPA3 certification; also, SAE in the 6GHz band can
      only use H2E (hunting-and-pecking is disallowed).
      
      Enable H2E in addition to hunting-and-pecking.
      
      #753
      !1045
      9f3d2a09
    • Thomas Haller's avatar
      e0cdbd73
    • Lubomir Rintel's avatar
      Revert "nm-device: avoid starting ac6 if l3cfg is not there" · 5f0ddaa6
      Lubomir Rintel authored
      This reverts commit bb0a31e6.
      
      This was pushed by accident.
      5f0ddaa6
    • Lubomir Rintel's avatar
      nm-device: clean up IP methods if we lose ifindex · fccb5608
      Lubomir Rintel authored
      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
      !1044
      
      Fixes-test: @ovs_cloned_mac_set_on_iface
      fccb5608
    • Lubomir Rintel's avatar
      nm-device: avoid starting ac6 if l3cfg is not there · bb0a31e6
      Lubomir Rintel authored
      If the ovs interface goes away, the ifindex gets zeroed out and l3cfg is
      cleaned. Avoid starting ac6 in that case -- add checks similar to what
      we do for ll6.
      
      Bad things happen otherwise:
      
        #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
      bb0a31e6
    • Thomas Haller's avatar
      CONTRIBUTING: clarify on the use/lack of curly braces around blocks · 9ab22dbc
      Thomas Haller authored
      This is the style we have ever since. Spell it out. With the difference
      that now single line statements may have braces.
      
      Recently we were already sloppy about allowing curly braces for single line
      statements. Maybe there was a point in that. Imagine you start with:
      
          if (condition)
              call(some, parameter);
      
      Afterwards you change the code so that the line becomes too long and
      clang-format wraps the line (requiring you to add braces):
      
          if (condition) {
              call(some,
                   call_another_function(hey));
          }
      
      The problem now is that this diff is larger than it would have been, if
      you added curly braces from the start. Also, it means you have to go
      back and forth to add/remove these braces, as clang-format reformats the
      code.
      
      Also, if you have if-else-if blocks, then mixing multi line statements
      with single line statements is also cumbersome, because when something
      needs to change, the diff is may be larger (and the change more
      cumbersome).
      
      So it might be convenient to just always add the braces, and the
      documented style now allows for that.
      9ab22dbc
    • Thomas Haller's avatar
      bluetooth: fix invalid assertion in NMBluezManager:dispose() · d5f917e7
      Thomas Haller authored
      We need to first free "priv->bzobjs", which then will unlink all bzobjs
      from the lists. The assert needs to go after.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=2028427
      
      Fixes: 4154d961 ('bluetooth: refactor BlueZ handling and let NMBluezManager cache ObjectManager data')
      d5f917e7
  7. 10 Jan, 2022 7 commits
    • Ana Cabral's avatar
    • Ana Cabral's avatar
      74c08c70
    • Ana Cabral's avatar
      version: add 1.36 macros · 29cf10ec
      Ana Cabral authored and Ana Cabral's avatar Ana Cabral committed
      29cf10ec
    • Ana Cabral's avatar
      trivial: fix typos · f0cb75f6
      Ana Cabral authored and Ana Cabral's avatar Ana Cabral committed
      f0cb75f6
    • Ana Cabral's avatar
      core/ovs: fix setting dpdk-devargs JSON to NULL · d6395f7e
      Ana Cabral authored and Ana Cabral's avatar Ana Cabral committed
      NMSettingOvsDpdk does not have a verify() implementation that would prevent
      the devargs property from being NULL. We must thus anticipate and handle
      a NULL value.
      
      Fixes: ae415212 ('ovs/ovsdb: add support for setting dpdk devargs option')
      d6395f7e
    • Thomas Haller's avatar
      device: ignore ndisc signal if device has no ifindex · 94215cdb
      Thomas Haller authored
      It's not clear how this could happen, but it did:
      
        #0  _g_log_abort (breakpoint=1) at gmessages.c:580
        #0  0x00007f4e782c5895 in _g_log_abort (breakpoint=1) at gmessages.c:580
        #1  0x00007f4e782c6b98 in g_logv (log_domain=0x558436ef1520 "nm", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffd5b20b0c0) at gmessages.c:1391
        #2  0x00007f4e782c6d63 in g_log (log_domain=log_domain@entry=0x558436ef1520 "nm", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f4e78313620 "%s: assertion '%s' failed") at gmessages.c:1432
        #3  0x00007f4e782c759d in g_return_if_fail_warning (log_domain=log_domain@entry=0x558436ef1520 "nm", pretty_function=pretty_function@entry=0x558436e49820 <__func__.43636> "nm_ip6_config_reset_addresses_ndisc", expression=expression@entry=0x558436e48b00 "priv->ifindex > 0") at gmessages.c:2809
        #4  0x0000558436bc47ca in nm_ip6_config_reset_addresses_ndisc (self=0x5584385cc190 [NMIP6Config], addresses=0x5584385952a0, addresses_n=1, plen=plen@entry=64 '@', ifa_flags=ifa_flags@entry=768) at src/core/nm-ip6-config.c:1468
        #5  0x0000558436d32e50 in ndisc_config_changed (ndisc=<optimized out>, rdata=0x55843856e4d0, changed_int=159, self=0x5584385c00f0 [NMDeviceOvsInterface]) at src/core/devices/nm-device.c:10838
        #6  0x00007f4e7323b09e in ffi_call_unix64 () at ../src/x86/unix64.S:76
        #7  0x00007f4e7323aa4f in ffi_call (cif=cif@entry=0x7ffd5b20b550, fn=fn@entry=0x558436d32a30 <ndisc_config_changed>, rvalue=<optimized out>, avalue=avalue@entry=0x7ffd5b20b460) at ../src/x86/ffi64.c:525
        #8  0x00007f4e787a0386 in g_cclosure_marshal_generic_va (closure=<optimized out>, return_value=<optimized out>, instance=<optimized out>, args_list=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=<optimized out>) at gclosure.c:1604
        #9  0x00007f4e7879f616 in _g_closure_invoke_va (closure=0x55843850b200, return_value=0x0, instance=0x55843856e5d0, args=0x7ffd5b20b800, n_params=2, param_types=0x558438495e50) at gclosure.c:867
        #10 0x00007f4e787bba9c in g_signal_emit_valist (instance=0x55843856e5d0, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7ffd5b20b800) at gsignal.c:3301
        #11 0x00007f4e787bc093 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3448
        #12 0x0000558436ddf04b in check_timestamps (ndisc=ndisc@entry=0x55843856e5d0 [NMLndpNDisc], now_msec=now_msec@entry=15132, changed=changed@entry=(NM_NDISC_CONFIG_DHCP_LEVEL | NM_NDISC_CONFIG_GATEWAYS | NM_NDISC_CONFIG_ADDRESSES | NM_NDISC_CONFIG_ROUTES | NM_NDISC_CONFIG_DNS_SERVERS | NM_NDISC_CONFIG_MTU)) at src/core/ndisc/nm-ndisc.c:1539
        #13 0x0000558436de08d0 in nm_ndisc_ra_received (ndisc=ndisc@entry=0x55843856e5d0 [NMLndpNDisc], now_msec=now_msec@entry=15132, changed=changed@entry=(NM_NDISC_CONFIG_DHCP_LEVEL | NM_NDISC_CONFIG_GATEWAYS | NM_NDISC_CONFIG_ADDRESSES | NM_NDISC_CONFIG_ROUTES | NM_NDISC_CONFIG_DNS_SERVERS | NM_NDISC_CONFIG_MTU)) at src/core/ndisc/nm-ndisc.c:1556
        #14 0x0000558436dd8d50 in receive_ra (ndp=<optimized out>, msg=0x5584385e77c0, user_data=<optimized out>) at src/core/ndisc/nm-lndp-ndisc.c:333
        #15 0x00007f4e794718a3 in ndp_call_handlers (msg=0x5584385e77c0, ndp=0x5584384db840) at libndp.c:1993
        #16 0x00007f4e794718a3 in ndp_sock_recv (ndp=0x5584384db840) at libndp.c:1871
        #17 0x00007f4e794718a3 in ndp_call_eventfd_handler (ndp=ndp@entry=0x5584384db840) at libndp.c:2097
        #18 0x00007f4e7947199f in ndp_callall_eventfd_handler (ndp=0x5584384db840) at libndp.c:2126
        #19 0x0000558436dda229 in event_ready (fd=<optimized out>, condition=<optimized out>, user_data=<optimized out>) at src/core/ndisc/nm-lndp-ndisc.c:588
        #20 0x00007f4e782bf95d in g_main_dispatch (context=0x558438409a40) at gmain.c:3193
        #21 0x00007f4e782bf95d in g_main_context_dispatch (context=context@entry=0x558438409a40) at gmain.c:3873
        #22 0x00007f4e782bfd18 in g_main_context_iterate (context=0x558438409a40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3946
        #23 0x00007f4e782c0042 in g_main_loop_run (loop=0x5584383e5150) at gmain.c:4142
      
      Above is a stack trace of commit af00e39d ('libnm: add NMIPAddress
      and NMIPRoute dups backported symbols from 1.30.8').
      
      As workaround, ignore the ndisc signal, if we currently don't have an ifindex.
      Also, recreate the NMIP6Config instances, if the ifindex doesn't match
      (or we don't have one).
      
      This workaround is probably good enough for the stable branch, as the
      code on main (1.35+) was heavily reworked and the fix does not apply
      there.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=2013266#c1
      
      !1058
      94215cdb
    • Thomas Haller's avatar
      daba069e