summaryrefslogtreecommitdiff
path: root/src/dnsmasq
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-10-04 15:21:21 +0200
committerThomas Haller <thaller@redhat.com>2017-10-10 08:46:47 +0200
commit5c299454b49b165f645c25fd3e083c0bb747ad91 (patch)
tree259470cd32be8d0c78e4f4f88bad2ef83e8574a8 /src/dnsmasq
parent2bdfc092d40daaf1af87a4cc2285caa63f35e9d3 (diff)
core: rework tracking of gateway/default-route in ip-config
Instead of having 3 properties @gateway, @never_default and @has_gateway on NMIP4Config/NMIP6Config that determine the default-route, track the default-route as a regular route. The gateway setting is the configuration knob for the default-route. Since an NMIP4Config/NMIP6Config instance only has one gateway property, it cannot track more then one default-routes (see related bug rh#1445417). Especially with policy routing, it might be interesting to configure a default-route in multiple tables. Also, later it might be interesting to allow adding default-routes as regular static routes in a connection, so that the user can configure additional route parameters for the default-route or add default-routes in multiple tables. With this patch, default-routes now have a rt_source property according to their origin. Also, the previous commits of this branch broke handling of the default-route :) . That should be working now again.
Diffstat (limited to 'src/dnsmasq')
-rw-r--r--src/dnsmasq/nm-dnsmasq-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c
index 3296cd0e73..4ac1e7c350 100644
--- a/src/dnsmasq/nm-dnsmasq-manager.c
+++ b/src/dnsmasq/nm-dnsmasq-manager.c
@@ -221,7 +221,7 @@ create_dm_cmd_line (const char *iface,
nm_cmd_line_add_string (cmd, s->str);
g_string_truncate (s, 0);
- if (!nm_ip4_config_get_never_default (ip4_config)) {
+ if (nm_ip4_config_best_default_route_get (ip4_config)) {
g_string_append (s, "--dhcp-option=option:router,");
g_string_append (s, localaddr);
nm_cmd_line_add_string (cmd, s->str);