Changeset 72
- Timestamp:
- 07/20/18 11:58:21 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r71 r72 313 313 my $orgid = shift; 314 314 my $level = shift; 315 my $exclude = shift ;315 my $exclude = shift || 'n'; 316 316 my $comment = shift; 317 317 $blockin =~ s/^\s+//; … … 332 332 } 333 333 $sth = $dbh->prepare("INSERT INTO blocks (block,orgid,level,parent,exclude,comments,ipcount) VALUES (?,?,?,?,?,?,". 334 "(SELECT count(*) FROM iplist WHERE ip << ? ANDexclude='n'))");334 "(SELECT count(*) FROM iplist i JOIN blocks b ON b.block=i.parent WHERE i.ip << ? AND i.exclude='n' AND b.exclude='n'))"); 335 335 $sth->execute("$block",$orgid,$level,$parent,$exclude,$comment,"$block"); 336 336 $sth = $dbh->prepare("UPDATE iplist SET parent=? WHERE parent=? AND ip << ?"); … … 354 354 my $orgid = shift; 355 355 my $level = shift; 356 my $exclude = shift ;356 my $exclude = shift || 'n'; 357 357 my $comment = shift; 358 358 $blockin =~ s/^\s+//; … … 387 387 } 388 388 # nb: no need to return anything, since the CIDR block is the key 389 } 389 } # updateblock() 390 390 391 391
Note:
See TracChangeset
for help on using the changeset viewer.