summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dhcp-manager/nm-dhcp-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dhcp-manager/nm-dhcp-utils.c b/src/dhcp-manager/nm-dhcp-utils.c
index c017f6cfb3..be0da80273 100644
--- a/src/dhcp-manager/nm-dhcp-utils.c
+++ b/src/dhcp-manager/nm-dhcp-utils.c
@@ -455,7 +455,8 @@ nm_dhcp_utils_ip4_config_from_options (const char *iface,
guint32 mask = nm_utils_ip4_prefix_to_netmask (address.plen);
nm_log_info (LOGD_DHCP4, " server identifier %s", str);
- if ((tmp_addr & mask) != (address.address & mask)) {
+ if ( (tmp_addr & mask) != (address.address & mask)
+ && !nm_ip4_config_get_direct_route_for_host (ip4_config, tmp_addr)) {
/* DHCP server not on assigned subnet, route needed */
memset (&route, 0, sizeof (route));
route.network = tmp_addr;