summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nm-ip4-config.c3
-rw-r--r--src/nm-ip6-config.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
index 1096fb0a23..f132e50754 100644
--- a/src/nm-ip4-config.c
+++ b/src/nm-ip4-config.c
@@ -704,6 +704,9 @@ nm_ip4_config_add_dependent_routes (NMIP4Config *self,
/* The destination network depends on the peer-address. */
network = nm_utils_ip4_address_clear_host_address (my_addr->peer_address, my_addr->plen);
+ if (my_addr->external)
+ continue;
+
if (_ipv4_is_zeronet (network)) {
/* Kernel doesn't add device-routes for destinations that
* start with 0.x.y.z. Skip them. */
diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c
index 8ed17b95f6..1255365745 100644
--- a/src/nm-ip6-config.c
+++ b/src/nm-ip6-config.c
@@ -480,6 +480,8 @@ nm_ip6_config_add_dependent_routes (NMIP6Config *self,
gboolean has_peer;
int routes_n, routes_i;
+ if (my_addr->external)
+ continue;
if (NM_FLAGS_HAS (my_addr->n_ifa_flags, IFA_F_NOPREFIXROUTE))
continue;
if (my_addr->plen == 0)