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:10 +0200
committerMichael Biebl <biebl@debian.org>2024-05-31 23:13:10 +0200
commitbaef747c9365b6044db3c2dfbb859652bdde1d76 (patch)
tree258affdacf1e997e3a0ab5a768797f085b3008ad /src/core/nm-l3cfg.c
parent88625ab09bf9c6d8f0d5042fcde398a5abfd1da6 (diff)
New upstream version 1.48.0 upstream/1.48.0
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).
                  *