Index: trunk/dns-rpc.cgi
===================================================================
--- trunk/dns-rpc.cgi	(revision 829)
+++ trunk/dns-rpc.cgi	(revision 832)
@@ -1631,11 +1631,9 @@
         # Delete ALL EVARYTHING!!one11!! in $args{cidr}
 
-        # Use offset => 'all' to make sure we actually find all the records we need to remove,
-        # otherwise the record(s) that need to be deleted may be more than 75 records down the
-        # list and won't get caught.  We also do a crude filter based on the /24 of $args{cidr}
-        # to reduce the remote's cost for the operation - if the revzone is large, it'll iterate
-        # over a Very Large Number(TM) of records, just to delete a small handful.  Bad juju.
-        my $filt = $args{cidr};
-        $filt =~ s,\.\d+(?:/\d+)?$,,;
+        # Deleting a small $args{cidr} from a large reverse zone will sometimes
+        # silently fail by not finding the appropriate record(s).  Prepend a
+        # Postgres CIDR operator to assist in filtering
+        my $filt = "<<= $args{cidr}";
+
         my $reclist = $dnsdb->getRecList(rpc => 1, defrec => 'n', revrec => 'y', id => $zonelist->[0]->{rdns_id},
             filter => $filt, offset => 'all');
