Bug 85 - zonec cannot handle WKS records
zonec cannot handle WKS records
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: Zonec Code
2.1.x
All other
: P2 minor
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-28 11:38 CEST by Stephane Bortzmeyer
Modified: 2005-01-10 14:07 CET (History)
0 users

See Also:


Attachments
Patch to fix encoding of WKS record in NSD 1.2.4 (1.40 KB, patch)
2004-07-28 12:44 CEST, Erik Rozendaal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Bortzmeyer 2004-07-28 11:38:32 CEST
We are secondary for a zone which has WKS records and zonec chokes on them (it
worked with nsd 1):

zonec: reading zone "edelweb.fr".
 ERR: Line 11 in secondary/edelweb.fr: syntax error
 ERR: Line 12 in secondary/edelweb.fr: syntax error

The relevant lines are:

	86400	IN	WKS	212.234.46.16 tcp  smtp
	86400	IN	WKS	212.234.46.16 udp  domain
Comment 1 Erik Rozendaal 2004-07-28 12:05:46 CEST
While implementing this for 2.1.x I noticed that the NSD 1.2 implementation is incorrect. For example, 
try:

dig @edelweb.fr edelweb.fr wks

vs

dig @ns2.nic.fr edelweb.fr wks

The second dig will have an incorrect WKS record because NSD 1.2 encodes the protocol field as a 16-
bit integer instead of an 8-bit integer. I'll append a patch for NSD 1.2.4 ASAP.
Comment 2 Stephane Bortzmeyer 2004-07-28 12:13:53 CEST
Reading RFC 1912, "2.6 Other Resource Records", I downgrade my bug. Sorry for
the false alert. We still have it in legacy zones (we manage a secondary and
cannot change the zone at will) so may be an option in nsd to accept them or a
better error message or a more detailed comment in zparser.y?

Comment 3 Erik Rozendaal 2004-07-28 12:44:39 CEST
Created attachment 19 [details]
Patch to fix encoding of WKS record in NSD 1.2.4
Comment 4 Erik Rozendaal 2004-07-28 12:46:34 CEST
Note that even though NSD 2.1 generates an error message for the WKS record the database is still 
generated. It just does not contain the WKS records. But it is nicer to support WKS.
Comment 5 Stephane Bortzmeyer 2004-07-28 14:11:52 CEST
> Note that even though NSD 2.1 generates an error message for the WKS 
> record the database is still generated. It just does not contain the WKS 
> records.

It does not seems so:

zonec: done with 2 errors.
/local/tmp/NSD/var/nsd/nsd.db is unmodified

And the output contains:

 ERR: Line 11 in secondary/edelweb.fr: syntax error
 ERR: Line 12 in secondary/edelweb.fr: syntax error
Comment 6 Erik Rozendaal 2004-07-28 14:17:09 CEST
That's actually the nsdc script checking for zonec errors. Zonec itself does generate the database, but 
nsdc does not replace the original database if there are compile errors.

But I just implemented WKS support in NSD 2.1.x. Unfortunately, due to other changes, I can't attach a 
simple patch this time. So you'll have to wait for the next NSD release. Probably by the end of this week.
Comment 7 Miek Gieben 2005-01-10 14:07:33 CET
updated status