diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py index e1afb92c8ea..d23a870af69 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsGuestNetwork.py @@ -38,13 +38,15 @@ class CsGuestNetwork: def get_dns(self): if not self.guest: return self.config.get_dns() - # Can a router provide dhcp but not dns? - if 'dns' in self.data and 'router_guest_gateway' in self.data: - return [self.data['router_guest_gateway']] + self.data['dns'].split(',') - elif "router_guest_gateway" in self.data: - return [self.data['router_guest_gateway']] - else: - return [""] + + dns = [] + if not self.config.use_extdns() and 'router_guest_gateway' in self.data: + dns.append(self.data['router_guest_gateway']) + + if 'dns' in self.data: + dns.extend(self.data['dns'].split(',')) + + return dns or [''] def set_dns(self, val): self.data['dns'] = val