summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-11-14 14:48:07 +0100
committerJiří Klimeš <jklimes@redhat.com>2012-11-27 13:36:34 +0100
commit9ff0190cefeaae10c5cf152f4d8bb76c5fd1e89b (patch)
tree31a59f5b56fbea873262110cfc625b627408abf3
parent29893eac1ab306cd2b0136857ee57f02b50cbc39 (diff)
downloadNetworkManager-nm-0-9-6.tar.gz
policy: fix setting system hostname (rh #875085)nm-0-9-6
Broken by commit 500315329765831d242d51d6a46f1e05869c15d2 (core: move DNS change handling to the policy and optimize DNS updates (bgo #676778)) It consolidated DNS update handling, but mistakenly removed hostname changing from NM_DEVICE_STATE_ACTIVATED state handler. Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
-rw-r--r--src/nm-policy.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index a6accfcb22..08c8c5c24a 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1278,22 +1278,16 @@ device_state_changed (NMDevice *device,
nm_dns_manager_begin_updates (dns_mgr, __func__);
ip4_config = nm_device_get_ip4_config (device);
- if (ip4_config) {
+ if (ip4_config)
nm_dns_manager_add_ip4_config (dns_mgr, ip_iface, ip4_config, NM_DNS_IP_CONFIG_TYPE_DEFAULT);
- update_ip4_dns (policy, dns_mgr);
- }
ip6_config = nm_device_get_ip6_config (device);
- if (ip6_config) {
+ if (ip6_config)
nm_dns_manager_add_ip6_config (dns_mgr, ip_iface, ip6_config, NM_DNS_IP_CONFIG_TYPE_DEFAULT);
- update_ip6_dns (policy, dns_mgr);
- }
+
+ update_routing_and_dns (policy, FALSE);
nm_dns_manager_end_updates (dns_mgr, __func__);
g_object_unref (dns_mgr);
-
- /* And make sure the best devices have the default route */
- update_ip4_routing (policy, FALSE);
- update_ip6_routing (policy, FALSE);
break;
case NM_DEVICE_STATE_UNMANAGED:
case NM_DEVICE_STATE_UNAVAILABLE: