Changeset 674


Ignore:
Timestamp:
01/15/15 15:36:22 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Fill in _validate_65284 so that it doesn't just blindly accept gibberish.

Still need to fill in a segment for export of these AAAA+PTR template
records; can't expand them the way A+PTR template records get handled.

Add a little more checking in addRec() to make sure we have both a host

and value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r673 r674  
    13131313# AAAA+PTR template record
    13141314# Not sure this can be handled sanely due to the size of IPv6 address space
     1315# _validate_65283 above should handle v6 template records fine.  It's on export we've got trouble.
    13151316sub _validate_65284 {
    1316   return ('OK','OK');
     1317  my $self = shift;
     1318  my %args = @_;
     1319
     1320  # do a quick check on the form of the hostname part;  this is effectively a
     1321  # "*.0.0.f.ip6.arpa" hostname, not an actual expandable IP template pattern
     1322  # like with 65283.
     1323  return ('FAIL', $errstr)
     1324        if !_check_hostname_form(${$args{host}}, ${$args{rectype}}, $args{defrec}, $args{revrec});
     1325  return $self->_validate_65283(%args);
    13171326} # done AAAA+PTR template record
    13181327
     
    41714180  my $stamp = shift;
    41724181  $stamp = '' if !$stamp;        # Timestamp should be a string at this point.
     4182
     4183  # extra safety net - apparently RPC can squeak this by.  O_o
     4184  return ('FAIL', "host must contain a value") if !$$host;
     4185  return ('FAIL', "val must contain a value") if !$$val;
    41734186
    41744187  # Spaces are evil.
Note: See TracChangeset for help on using the changeset viewer.