- Timestamp:
- 04/15/16 12:16:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r715 r716 4189 4189 $args{defrec} = 'n' if !$args{defrec}; 4190 4190 4191 # RPC callers generally want the "true" IP. Flag argument for those to bypass showrev_arpa 4192 ##fixme: this will still blow up if some idiot has actually stored .arpa names in the DB. 4193 # ... do we care? 4194 $args{rpc} = 0 if !$args{rpc}; 4195 4191 4196 # protection against bad or missing arguments 4192 4197 $args{sortorder} = 'ASC' if !$args{sortorder} || !grep /^$args{sortorder}$/, ('ASC','DESC'); … … 4231 4236 foreach (qw(type distance weight port ttl description location)) { 4232 4237 if ($args{$_}) { 4233 $sql .= " AND $_ ~* ?";4238 $sql .= " AND r.$_ ~* ?"; 4234 4239 push @bindvars, $args{$_}; 4235 4240 } … … 4260 4265 $recsth->execute(@bindvars); 4261 4266 while (my $rec = $recsth->fetchrow_hashref) { 4262 if ( $args{revrec} eq 'y' && $args{defrec} eq 'n' &&4267 if (!$args{rpc} && $args{revrec} eq 'y' && $args{defrec} eq 'n' && 4263 4268 ($self->{showrev_arpa} eq 'record' || $self->{showrev_arpa} eq 'all') && 4264 4269 $rec->{val} !~ /\.arpa$/ ) {
Note:
See TracChangeset
for help on using the changeset viewer.