Index: /trunk/packages/invirt-dns/debian/changelog
===================================================================
--- /trunk/packages/invirt-dns/debian/changelog	(revision 2200)
+++ /trunk/packages/invirt-dns/debian/changelog	(revision 2201)
@@ -1,7 +1,9 @@
 invirt-dns (0.0.10) unstable; urgency=low
 
-  * Add support for resolving PTR records in the in-addr.arpa zone
+  * Add support for resolving PTR records in the in-addr.arpa zone.
+  * If we're not authoritative for an in-addr.arpa zone, generate a
+    phantom SOA record for the exact request that came in.
 
- -- Quentin Smith <quentin@mit.edu>  Fri, 27 Feb 2009 02:39:25 -0500
+ -- Quentin Smith <quentin@mit.edu>  Fri, 27 Feb 2009 02:56:31 -0500
 
 invirt-dns (0.0.9) unstable; urgency=low
Index: /trunk/packages/invirt-dns/invirt-dns
===================================================================
--- /trunk/packages/invirt-dns/invirt-dns	(revision 2200)
+++ /trunk/packages/invirt-dns/invirt-dns	(revision 2201)
@@ -71,5 +71,8 @@
                     best_domain = domain
             if best_domain == '':
-                return defer.fail(failure.Failure(dns.DomainError(name)))
+                if name.endswith('.in-addr.arpa'):
+                    best_domain = name # Act authoritative for the IP address for reverse resolution requests
+                else:
+                    return defer.fail(failure.Failure(dns.DomainError(name)))
             domain = best_domain
         results = []
@@ -81,5 +84,5 @@
         if cls == dns.IN:
             host = name[:-len(domain)-1]
-            if not host: # Request for the domain itself.
+            if not host and type != dns.PTR: # Request for the domain itself.
                 if type in (dns.A, dns.ALL_RECORDS):
                     record = dns.Record_A(config.dns.nameservers[0].ip, ttl)
