about summary refs log tree commit diff
path: root/src/core/nm-l3cfg.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-05-31 23:13:23 +0200
committerMichael Biebl <biebl@debian.org>2024-05-31 23:13:23 +0200
commitda8adc8ce98d973ff7dcfc6f8946a98c9954ce26 (patch)
tree1857c63fe4c7026722826c6b49b7da079135452c /src/core/nm-l3cfg.c
parent41e9c69453b16f5a615ca0896da4bdaeffef569e (diff)
parentbaef747c9365b6044db3c2dfbb859652bdde1d76 (diff)
Update upstream source from tag 'upstream/1.48.0'
Update to upstream version '1.48.0'
with Debian dir 63138a4bffa35eb63c7add34fedbf5a28717017e
Diffstat (limited to 'src/core/nm-l3cfg.c')
-rw-r--r--src/core/nm-l3cfg.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c
index 12357fba..57baeac2 100644
--- a/src/core/nm-l3cfg.c
+++ b/src/core/nm-l3cfg.c
@@ -1301,7 +1301,6 @@ _commit_collect_routes(NML3Cfg          *self,
     const int                    IS_IPv4 = NM_IS_IPv4(addr_family);
     const NMDedupMultiHeadEntry *head_entry;
     const NMDedupMultiEntry     *entry;
-    gboolean                     is_dhcp_enabled;
 
     nm_assert(routes && !*routes);
     nm_assert(routes_nodev && !*routes_nodev);
@@ -1321,10 +1320,10 @@ _commit_collect_routes(NML3Cfg          *self,
         else {
             nm_assert(NMP_OBJECT_CAST_IP_ROUTE(obj)->ifindex == self->priv.ifindex);
 
-            is_dhcp_enabled =
-                nm_l3_config_data_get_dhcp_enabled(self->priv.p->combined_l3cd_commited,
-                                                   addr_family);
-            if (!any_addrs && is_dhcp_enabled) {
+            if (!any_addrs
+                && !nm_l3_config_data_get_allow_routes_without_address(
+                    self->priv.p->combined_l3cd_commited,
+                    addr_family)) {
                 /* This is a unicast route (or a similar route, which has an
                  * ifindex).
                  *