Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-1091

not Support multiple resource record answers caused by ResourceRecordImpl's error equals method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.1
    • 2.0.0.AM27
    • dns
    • None
    • Windows XP , apacheds-protocol-dns-1.5.1.jar

    Description

      When I create MyRecordStore to implements RecordStore, I add four record answers ,but I can only get One Record.

      for example:
      I start My Test Dns Server based on apacheds-protocol-dns-1.5.1.jar.
      I want get four record like:

      E:\bind>nslookup
      > server 10.108.20.126
      Default server: 10.108.20.126
      Address: 10.108.20.126#53
      > 618119.com
      Server: 10.108.20.126
      Address: 10.108.20.126#53
      
      Non-authoritative answer:
      ns1.dnspod.net nameserver = 10.108.20.126.
      ns2.dnspod.net nameserver = 10.108.20.123.
      ns3.dnspod.net nameserver = 10.108.20.124.
      ns4.dnspod.net nameserver = 10.108.20.125.
      >
      
      

      but I can only get like:

      E:\bind>nslookup
      > server 10.108.20.126
      Default server: 10.108.20.126
      Address: 10.108.20.126#53
      > 618119.com
      Server: 10.108.20.126
      Address: 10.108.20.126#53
      
      Non-authoritative answer:
      ns1.dnspod.net nameserver = 10.108.20.126.
      

      then I found this bug caused by org.apache.directory.server.dns.messages.ResourceRecordImpl.

      the equals method is :

      return ( this.domainName.equalsIgnoreCase( that.domainName ) ) && ( this.recordType == that.recordType )
      && ( this.recordClass == that.recordClass );
      

      so i change it to :

      return (this.domainName.equalsIgnoreCase(that.domainName)) &&
      (this.recordType == that.recordType)
      && (this.recordClass == that.recordClass)
      && this.attributes.equals(that.attributes);
      

      I added attributes.equals for ResourceRecordImpl.

      Then I can query for get multiple resource record answers 。

      Please Fix this bug.

      also see: http://issues.apache.org/jira/browse/DIRSERVER-128

      Attachments

        Activity

          People

            enriquer9 Enrique Rodriguez
            lizongbo lizongbo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: