From a1525581ae3aff3da7f12fe7b1ec76b568bf098a Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Wed, 1 Jul 2009 13:58:19 -0700 Subject: [PATCH] vswitchd: Enable updating resolv.conf by default when using discovery When vSwitch does discovery, it is supposed to update resolv.conf by default. The way configuration parameters were being read, it would disable this update by default. --- vswitchd/bridge.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index ba905287..63c31c25 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1076,10 +1076,14 @@ bridge_reconfigure_controller(struct bridge *br) int rate_limit, burst_limit; if (!strcmp(controller, "discover")) { + bool update_resolv_conf = true; + + if (cfg_has("%s.update-resolv.conf", pfx)) { + update_resolv_conf = cfg_get_bool(0, "%s.update-resolv.conf"); + } ofproto_set_discovery(br->ofproto, true, cfg_get_string(0, "%s.accept-regex", pfx), - cfg_get_bool(0, "%s.update-resolv.conf", - pfx)); + update_resolv_conf); } else { struct netdev *netdev; bool in_band; -- 2.30.2