Issue Details (XML | Word | Printable)

Key: DIRSERVER-1091
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Enrique Rodriguez
Reporter: lizongbo
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

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

Created: 31/Oct/07 08:50 AM   Updated: 19/Jun/08 02:10 AM
Component/s: dns
Affects Version/s: 1.5.1
Fix Version/s: 2.0.0

Time Tracking:
Not Specified

Environment: Windows XP , apacheds-protocol-dns-1.5.1.jar


 Description  « Hide
When I create MyRecordStore to implements RecordStore, I add four record answers ,but I can noly 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:
[code]

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.
>

[/code]

but I can only get like:
[code]
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.
[/code]

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

the equals method is :

[code]

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

[/code]

so i change it to :

[code]

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

[/code]

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





 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny added a comment - 31/Mar/08 08:40 PM
Postponed

Alex Karasulu added a comment - 19/Jun/08 02:10 AM
Again moving to 2.0 if this can be fixed by someone otherwise it will carry over.