Changeset 455


Ignore:
Timestamp:
01/16/13 18:01:28 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix precedence bug in SQL for getRevPattern that in a test case
caused the reverse entry for an IPv6 block to be returned for a
/29 IPv4 block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r452 r455  
    39363936
    39373937  my ($revpatt) = $dbh->selectrow_array("SELECT r.host FROM records r JOIN revzones z ON r.rdns_id=z.rdns_id ".
    3938         "WHERE r.type=65282 OR r.type=65283 AND z.group_id=? AND CAST (r.val AS inet) >>= ? ".
     3938        "WHERE (r.type=65282 OR r.type=65283) AND z.group_id=? AND CAST (r.val AS inet) >>= ? ".
    39393939        "ORDER BY CAST (r.val AS inet) DESC LIMIT 1", undef, ($group, $cidr) );
    39403940  return $revpatt;
Note: See TracChangeset for help on using the changeset viewer.