- 11 Jan, 2022 3 commits
-
-
Lubomir Rintel authored
This reverts commit bb0a31e6. This was pushed by accident.
-
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
-
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
-
- 09 Dec, 2021 1 commit
-
-
Beniamino Galvani authored
Before the l3cfg rework, the ip-iface property was exported only for interfaces with an ifindex, and only in some device states. Restore the old behavior since it is part of the API. For example, firewalld uses the property to tell which interfaces have a ifindex. Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration') https://bugzilla.redhat.com/show_bug.cgi?id=2026024 !1042
-
- 01 Dec, 2021 1 commit
-
-
Lubomir Rintel authored
This bumps L3_CONFIG_DATA_TYPE_MANUALIP to be the most important address source; which is what had been the case before NetworkManager/next and is presumably what the user expects. It also comes into play for iBFT-booted machines, where iBFT contains a permanent address (no lifetime data), while DHCP might lease out the same one. In that case, expiry of the latter could potentially disrupt connectivity to a vital storage volume. Fixes: 14962cb4 ('merge: branch 'next''): https://bugzilla.redhat.com/show_bug.cgi?id=2013921 !1011
-
- 29 Nov, 2021 1 commit
-
-
We use clang-format for automatic formatting of our source files. Since clang-format is actively maintained software, the actual formatting depends on the used version of clang-format. That is unfortunate and painful, but really unavoidable unless clang-format would be strictly bug-compatible. So the version that we must use is from the current Fedora release, which is also tested by our gitlab-ci. Previously, we were using Fedora 34 with clang-tools-extra-12.0.1-1.fc34.x86_64. As Fedora 35 comes along, we need to update our formatting as Fedora 35 comes with version "13.0.0~rc1-1.fc35". An alternative would be to freeze on version 12, but that has different problems (like, it's cumbersome to rebuild clang 12 on Fedora 35 and it would be cumbersome for our developers which are on Fedora 35 to use a clang that they cannot easily install). The (differently painful) solution is to reformat from time to time, as we switch to a new Fedora (and thus clang) ...
-
- 18 Nov, 2021 25 commits
-
-
Beniamino Galvani authored
Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration')
-
Beniamino Galvani authored
Problem: if l3cfg commits an address and routes from DHCP, when the address expires those objects are removed automatically. NM tracks the objects as missing as if the user removed them. This is to prevent l3cfg to committing them again. If the lease if renewed, l3cfg should be allowed to commit those objects again. Introduce a l3cd flag to indicate that it should be force-committed once, and propagate this flag to platform objects. In this way, l3cfg can avoid committing again objects that are removed externally, but it can commit them when the l3cd changes. Fixes-test: @bridge_down_to_l2_only
-
When a route has the connectivity check enabled and does not have full connectivity, it should have its route metric penalized, this way this route will not be preferred over others. Fixes-test: @per_device_connectivity_check
-
When doing a reapply the ip_state must be set as PENDING, if not the ipdhcp_state won't be extended to ip_state. In addition, if one of the IP configuration is ready and the other may fail, then we should consider it ready. The other ip state does not matter at all, it can be none too. Fixes-test: @nmcli_device_reapply_routes
-
Sticky update flag forces a commit at UPDATE level after unmanaging a device. As a result, all the link local addresses will be removed. To prevent the commit after unmanaging a device, clear sticky update flag. Signed-off-by:
Wen Liang <liangwen12year@gmail.com>
-
Beniamino Galvani authored
In this way, the ipv6 privacy setting is committed as soon as the connection goes up. Fixes-test: @ipv6_ip6-default_privacy
-
Beniamino Galvani authored
If we reset the addrgenmode, IPv6 addresses are lost.
-
Beniamino Galvani authored
If addrgenmode=0 is already set, the function should still toggle disable_ipv6 if needed, to stop the generation of temporary addresses. Also, it should store the last set value into 'previous_mode_val'. Fixes-test: @ipv6_keep_external_routes
-
Beniamino Galvani authored
If NM set addrgenmode=none, it's because it manages the IPv6 in user space. In such case it should never disable IPv6.
-
Beniamino Galvani authored
If we had a lease and it expired, don't fail immediately. The client will try to obtain a new lease and it will send a NO_LEASE_TIMEOUT event once it fails. Only at that time we should fail.
-
Fixes: 0b05c5ad ('device: fail when a addr family fails and the other is disabled')
-
Beniamino Galvani authored
Fixes-test: @ipv6_token
-
Beniamino Galvani authored
Fix the following assertion failure: "nm_assert(NM_DEVICE_GET_PRIVATE(self)->act_request.obj);" 0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 1 __GI_abort () at abort.c:79 2 g_assertion_message () at gtestutils.c:2533 3 g_assertion_message_expr () at gtestutils.c:2556 4 activation_source_invoke_or_schedule (self=0x55b543884610 [NMDeviceBridge], func=0x55b542e8c940 <activate_stage3_ip_config>, do_sync=0) at src/core/devices/nm-device.c:8854 5 nm_device_set_carrier (self=0x55b543884610 [NMDeviceBridge], carrier=1) at src/core/devices/nm-device.c:6217 6 device_link_changed (user_data=user_data@entry=0x55b543884610) at src/core/devices/nm-device.c:6479 7 g_idle_dispatch (source=0x55b5438577d0, callback=0x55b542e95980 <device_link_changed>, user_data=0x55b543884610) at gmain.c:5579 8 g_main_dispatch (context=0x55b543719bc0) at gmain.c:3193 9 g_main_context_dispatch (context=context@entry=0x55b543719bc0) at gmain.c:3873 10 g_main_context_iterate (context=0x55b543719bc0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3946
-
Beniamino Galvani authored
Fixes-test: @ipv4_method_shared_with_already_running_dnsmasq
-
Beniamino Galvani authored
When NM is restarted and the previous connection gets assumed, addresses are already configured; in such case we don't need to wait.
-
Beniamino Galvani authored
Fixes-test: @ipv6_preserve_cached_routes
-
Beniamino Galvani authored
IPv6 must be enabled when the device enters the DISCONNECTED state.
-
Beniamino Galvani authored
When a virtual interface is removed externally, the device is unrealized and the ifindex is cleared; this also detaches the existing l3cfg from the device. At this point the l3cd entry for the device lingers forever in the DNS manager. Emit a last L3CD_CHANGED so that the old entry gets removed. Fixes-test: @disconnect_from_pppoe
-
Beniamino Galvani authored
-
Beniamino Galvani authored
-
Beniamino Galvani authored
-
Beniamino Galvani authored
-
Beniamino Galvani authored
Previously the prefix route fe80::/64 was always added to the main table. Fixes-test: @ipv6_route_set_route_with_tables
-
Beniamino Galvani authored
Fixes-test: @vlan_connection_down_with_autoconnect Fixes-test: @vlan_disconnect_device_with_autoconnect
-
Completely rework IP configuration in the daemon. Use NML3Cfg as layer 3 manager for the IP configuration of an interface. Use NML3ConfigData as pieces of configuration that the various components collect and configure. NMDevice is managing most of the IP configuration at a higher level, that is, it starts DHCP and other IP methods. Rework the state handling there. This is a huge rework of how NetworkManager daemon handles IP configuration. Some fallout is to be expected. It appears the patch deletes many lines of code. That is not accurate, because you also have to count the files `src/core/nm-l3*`, which were unused previously. Co-authored-by:
Beniamino Galvani <bgalvani@redhat.com>
-
- 02 Nov, 2021 1 commit
-
-
Lubomir Rintel authored
Thomas thinks this is a bad idea and probably is right: !1000 (comment 1122853) This reverts commit c75b7dd8.
-
- 27 Oct, 2021 1 commit
-
-
Lubomir Rintel authored
We need to make sure StateChanged goes on the D-Bus only after the policy is done dealing with the state change internally. This is done so that we can be sure the DNS changes are committed at the time "nmcli c up" returns. https://bugzilla.redhat.com/show_bug.cgi?id=2006677
-
- 18 Oct, 2021 1 commit
-
-
Fernando Fernández Mancera authored
When NetworkManager is reloaded the config from active devices is not being reloaded properly. Related: https://bugzilla.redhat.com/1852445 Fixes: 121c58f0 ('core: set number of SR-IOV VFs asynchronously') Signed-off-by:
Fernando Fernandez Mancera <ffmancera@riseup.net>
-
- 15 Oct, 2021 1 commit
-
-
Robin Ebert authored
-
- 13 Oct, 2021 1 commit
-
-
Beniamino Galvani authored
The MASTER property must be emitted on the port; while PORTS and SLAVES on the controller. Fixes: 9d2ed74e ('core: introduce device::ports property')
-
- 11 Oct, 2021 1 commit
-
-
Fernando Fernández Mancera authored
The property `PROP_PORTS` should be of type g_param_spec_variant() with variant 'ao'. This way the variant can be cached. The deprecated property 'device::slaves' in 'src/core/devices/nm-device.c' must have the same getter-implementation, returning the same GVariant instance. Signed-off-by:
Fernando Fernandez Mancera <ffmancera@riseup.net>
-
- 24 Sep, 2021 1 commit
-
-
Thomas Haller authored
-
- 23 Sep, 2021 1 commit
-
-
Thomas Haller authored
-
- 22 Sep, 2021 1 commit
-
-
Thomas Haller authored
-