"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "clc/modules/dns/src/main/java/com/eucalyptus/dns/resolvers/GenericDnsResolver.java" between
eucalyptus-4.4.1.tar.gz and eucalyptus-4.4.2.tar.gz

About: Eucalyptus (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems) is an infrastructure for implementing "cloud computing" on clusters (compatible with Amazon’s EC2 interface, but designed to support multiple client-side interfaces).

GenericDnsResolver.java  (eucalyptus-4.4.1):GenericDnsResolver.java  (eucalyptus-4.4.2)
skipping to change at line 26 skipping to change at line 26
* Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta * Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
* CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need * CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
* additional information or have any questions. * additional information or have any questions.
************************************************************************/ ************************************************************************/
package com.eucalyptus.dns.resolvers; package com.eucalyptus.dns.resolvers;
import static com.eucalyptus.util.dns.DnsResolvers.DnsRequest; import static com.eucalyptus.util.dns.DnsResolvers.DnsRequest;
import java.util.List; import java.util.List;
import java.util.NavigableSet; import java.util.NavigableSet;
import java.util.function.Predicate;
import org.xbill.DNS.Name; import org.xbill.DNS.Name;
import org.xbill.DNS.Record; import org.xbill.DNS.Record;
import com.eucalyptus.component.Components; import com.eucalyptus.component.Components;
import com.eucalyptus.component.ServiceConfiguration; import com.eucalyptus.component.ServiceConfiguration;
import com.eucalyptus.component.id.Dns; import com.eucalyptus.component.id.Dns;
import com.eucalyptus.util.dns.DomainNameRecords; import com.eucalyptus.util.dns.DomainNameRecords;
import com.eucalyptus.util.dns.DomainNames; import com.eucalyptus.util.dns.DomainNames;
import com.eucalyptus.util.dns.DnsResolvers.DnsResolver; import com.eucalyptus.util.dns.DnsResolvers.DnsResolver;
skipping to change at line 76 skipping to change at line 77
final Name name = query.getName( ); final Name name = query.getName( );
if( RequestType.SOA.apply(query)){ if( RequestType.SOA.apply(query)){
if(DomainNames.externalSubdomain().equals(name)){ if(DomainNames.externalSubdomain().equals(name)){
final Record soaRec = DomainNameRecords.sourceOfAuthorityStaticSerial(na me); final Record soaRec = DomainNameRecords.sourceOfAuthorityStaticSerial(na me);
return DnsResponse.forName( name ).answer( soaRec ); return DnsResponse.forName( name ).answer( soaRec );
} }
}else if (RequestType.ANY.apply(query)){ }else if (RequestType.ANY.apply(query)){
if(DomainNames.externalSubdomain().equals(name)){ if(DomainNames.externalSubdomain().equals(name)){
final List<Record> answers = Lists.newArrayList(); final List<Record> answers = Lists.newArrayList();
answers.add(DomainNameRecords.sourceOfAuthorityStaticSerial(name)); answers.add(DomainNameRecords.sourceOfAuthorityStaticSerial(name));
final Predicate<ServiceConfiguration> nsServerUsable = DomainNameRecords .activeNameserverPredicate( );
NavigableSet<ServiceConfiguration> nsServers = Components.lookup( Dns.cl ass ).services( ); NavigableSet<ServiceConfiguration> nsServers = Components.lookup( Dns.cl ass ).services( );
List<Record> additional = Lists.newArrayList( ); List<Record> additional = Lists.newArrayList( );
Name domain = DomainNames.isInternalSubdomain( name ) ? DomainNames.inte rnalSubdomain( ) : DomainNames.externalSubdomain( ); Name domain = DomainNames.isInternalSubdomain( name ) ? DomainNames.inte rnalSubdomain( ) : DomainNames.externalSubdomain( );
int idx = 1; int idx = 1;
for ( ServiceConfiguration conf : nsServers ) { for ( ServiceConfiguration conf : nsServers ) {
additional.add( DomainNameRecords.addressRecord( final int offset = idx++;
Name.fromConstantString( "ns" + (idx++) + "." + domain ) , if ( nsServerUsable.test( conf ) ) {
NameserverResolver.maphost( request.getLocalAddress( ), conf.getIn additional.add( DomainNameRecords.addressRecord(
etAddress( ) ) ) ); Name.fromConstantString( "ns" + offset + "." + domain ),
NameserverResolver.maphost( request.getLocalAddress( ), conf.get
InetAddress( ) ) ) );
}
} }
answers.addAll(DomainNameRecords.nameservers( name )); answers.addAll(DomainNameRecords.nameservers( name ));
return DnsResponse.forName( name ) return DnsResponse.forName( name )
.withAdditional( additional ) .withAdditional( additional )
.answer(answers ); .answer(answers );
} }
} }
return null; return null;
} }
} }
 End of changes. 3 change blocks. 
4 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)