I'm not sure where this syntax originates (maybe an RFC, I haven't looked). But BIND and earlier NSD accepted an IPv6 format where the low order 32 bits could be written in dotted decimal, at least if the high order 96 bits had the value (in IPv6 form) ::FFFF. So I could write an AAAA record like: ham.org. 12H IN AAAA ::FFFF:209.102.192.73 which would actually be the same as: ham.org. 12H IN AAAA ::FFFF:D166:C049 It's just a slight convenience to have this. I was just wondering if this is supposed to be in there or not. When I upgraded to 2.1.2 from a pre-2 version, those records like the first one above became syntax errors, while those like the second one worked OK. -- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ | | (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ | -----------------------------------------------------------------------------
[On 23 Aug, @08:31, Phil wrote in "IPv4 in IPv6 in AAAA records ..."]> I'm not sure where this syntax originates (maybe an RFC, I haven't looked). > But BIND and earlier NSD accepted an IPv6 format where the low order 32 bits > could be written in dotted decimal, at least if the high order 96 bits had > the value (in IPv6 form) ::FFFF. So I could write an AAAA record like: > > ham.org. 12H IN AAAA ::FFFF:209.102.192.73 > > which would actually be the same as: > > ham.org. 12H IN AAAA ::FFFF:D166:C049 > > It's just a slight convenience to have this. I was just wondering if thisI think it's in the RFC to allow this, so it should be added to zonec. But just to satisfy my own curiosity. Why do you need this?> is supposed to be in there or not. When I upgraded to 2.1.2 from a pre-2 > version, those records like the first one above became syntax errors, while > those like the second one worked OK.this is an extra reason to fix this, grtz Miek
[On 23 Aug, @ 08:31, Phil wrote in "IPv4 in IPv6 in AAAA records ..."]> ham.org. 12H IN AAAA ::FFFF:D166:C049 > > It's just a slight convenience to have this. I was just wondering if thisthe following patch restores this behavior. Regards, Miek =-=-=-=-=-= begin patch =-=-=-=-=-Index: RELNOTES ==================================================================RCS file: /cvs/nsd/RELNOTES,v retrieving revision 1.39 diff -u -r1.39 RELNOTES --- RELNOTES 18 Aug 2004 09:01:33 -0000 1.39 +++ RELNOTES 23 Aug 2004 08:09:58 -0000 @@ -6,6 +6,7 @@ BUG FIXES: - Bug #87: allow @ in the rdata + - Bug #88: allow ::FFFF:ipv4addr in AAAA records 2.1.2 ============Index: zparser.y ==================================================================RCS file: /cvs/nsd/zparser.y,v retrieving revision 1.74 diff -u -r1.74 zparser.y --- zparser.y 18 Aug 2004 09:01:33 -0000 1.74 +++ zparser.y 23 Aug 2004 08:09:58 -0000 @@ -672,7 +672,7 @@ { error_prev_line("Syntax error in PX record"); } ; -rdata_aaaa: STR trail +rdata_aaaa: dotted_str trail { zadd_rdata_wireformat(zparser_conv_a6(parser->region, $1.str)); /* IPv6 address */ }
On Mon, Aug 23, 2004 at 01:31:01AM -0500, Phil Howard wrote:> I'm not sure where this syntax originates (maybe an RFC, I haven't looked). > But BIND and earlier NSD accepted an IPv6 format where the low order 32 bits > could be written in dotted decimal, at least if the high order 96 bits had > the value (in IPv6 form) ::FFFF. So I could write an AAAA record like: > > ham.org. 12H IN AAAA ::FFFF:209.102.192.73 > > which would actually be the same as: > > ham.org. 12H IN AAAA ::FFFF:D166:C049::ffff/96 is the IPv4-mapped-IPv6 address prefix, it's intended use is to allow an IPv6 stack to forward IPv4 packets to an IPv6-listening service (for example NSD listening on :: on Linux will see packets from 193.1.193.194 as ::ffff:193.1.193.194). There is also the IPv4-compatible-IPv6 address prefix, ::/96 and addresses look like: ::193.1.193.194. Using either in AAAA records is a *really* terrible idea. This is still a bug in NSD though, as the IPv6 standards allow for the low order 32 bits to be represented as dotted quads for any address, for example: colmmacccc at byron:~$ ping6 2001:770:18:2:206:5bff:254.63.170.218 PING 2001:770:18:2:206:5bff:254.63.170.218(2001:770:18:2:206:5bff:fe3f:aada) from ::1 : 56 data bytes 64 bytes from 2001:770:18:2:206:5bff:fe3f:aada: icmp_seq=1 ttl=64 time=0.066 ms c.f. Appendix B to RFC2373 -- Colm MacC?rthaigh / HEAnet, Teach Brooklawn, / Innealt?ir Ghr?as?in +353 1 6609040 / B?thar Shelbourne, B?C, IE / http://www.hea.net/