Bug 64 - Answer for request of a host resolved by a wildcard-resource-record is not understandable by dig.
Answer for request of a host resolved by a wildcard-resource-record is not un...
Status: CLOSED FIXED
Product: NSD
Classification: Unclassified
Component: NSD Code
other
All Linux
: P2 normal
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-25 15:50 CEST by Wilhelm Zenz
Modified: 2003-10-30 16:05 CET (History)
0 users

See Also:


Attachments
This seems to fix this bug. Need to investigate why and if this really works... (531 bytes, patch)
2003-07-27 10:07 CEST, Erik Rozendaal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wilhelm Zenz 2003-07-25 15:50:24 CEST
Here my test-szenario:
--> platform: 
Linux wappenix.dominic.de. 2.4.20-686 #1 Mon Jan 13 22:22:30 EST 2003 i686 GNU/Linux

--> nsd-version: nsd-1.2.1

--> cat nsd.zones:
zone    wildcard.test   dominic-zones/wildcard.test.zone

--> cat wildcard.test.zone:
wildcard.test.          3600    IN      SOA     wappenix.dominic.de.
hostmaster.dominic.de. 2003071900 43200 7200 604800 345600
wildcard.test.          3600    IN      NS      wappenix.dominic.de.
*.wildcard.test.        3600    IN      MX 10   wappenix.dominic.de.

--> nsdc rebuild: OK

--> nsdc reload: OK

--> dig @wappenix.dominic.de wildcard.test IN AXFR
; <<>> DiG 9.2.2 <<>> @wappenix.dominic.de wildcard.test IN AXFR
;; global options:  printcmd
wildcard.test.          3600    IN      SOA     wappenix.dominic.de.
hostmaster.dominic.de. 2003071900 43200 7200 604800 345600
wildcard.test.          3600    IN      NS      wappenix.dominic.de.
*.wildcard.test.        3600    IN      MX      10 wappenix.dominic.de.
wildcard.test.          3600    IN      SOA     wappenix.dominic.de.
hostmaster.dominic.de. 2003071900 43200 7200 604800 345600
;; Query time: 4 msec
;; SERVER: 172.29.100.115#53(wappenix.dominic.de)
;; WHEN: Fri Jul 25 15:28:21 2003
;; XFR size: 5 records

--> dig @wappenix.dominic.de mail.wildcard.test IN MX
;; Got bad packet: bad label type
82 bytes
08 75 85 00 00 01 00 01 00 01 00 00 04 6d 61 69
6c 08 77 69 6c 64 63 61 72 64 04 74 65 73 74 00
00 0f 00 01 c0 0c 00 0f 00 01 00 00 0e 10 00 14
00 0a 08 77 61 70 70 65 6e 69 78 03 73 68 77 03
63 6f 6d 00 c0 13 00 02 00 01 00 00 0e 10 00 02
c0 32
Comment 1 Erik Rozendaal 2003-07-27 10:01:18 CEST
This is a regression from 1.1.0 to 1.2.x.
Comment 2 Erik Rozendaal 2003-07-27 10:07:15 CEST
Created attachment 14 [details]
This seems to fix this bug. Need to investigate why and if this really works...
Comment 3 Erik Rozendaal 2003-07-27 10:55:48 CEST
The previous patch does fix the bug.  The qname pointer needs to be adjusted by
2 (the length of the wildcard label) so any compression pointers stored in the
associated RR.  These compression pointers assume the first label (the wildcard)
always has length two.