Changeset 902 for trunk


Ignore:
Timestamp:
02/15/17 14:15:32 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

First pass safety fence to help prevent "missing" forward records. If a
DNS entry is passed as an unqualified name, the A part of the A+PTR
metarecord gets dropped since there will be no match in the domain list.

This adds a setting, defaulting to enabled, to append the default domain
to unqualified names in the main rDNS field on add and update.

Location:
trunk/cgi-bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/IPDB.pm

    r899 r902  
    139139# Billing system return link
    140140our $billinglink = 'https://billing.example.com/radius.pl';
     141
     142# Append the default domain on unqualified DNS names?
     143our $append_domain = 1;
    141144
    142145##
     
    15511554  $args{rdns} = '' if !$args{rdns};
    15521555
     1556  # munge the reverse name to include the default domain if there are no dots.  Don't append if
     1557  # there's no DNS argument though, that would likely cause Big Problems
     1558  $args{rdns} .= ".$IPDB::domain" if $IPDB::append_domain && $args{rdns} && $args{rdns} !~ /\./;
     1559
    15531560  $args{user} = $args{rpcuser} if !$args{user};
    15541561
     
    20992106  # Return early if rDNS flag(s) are not set
    21002107  return ('OK','OK') unless ($pinfo->{revavail} || $pinfo->{revpartial});
     2108
     2109  # munge the reverse name to include the default domain if there are no dots.  Don't append if
     2110  # there's no DNS argument though, that would likely cause Big Problems
     2111  $args{rdns} .= ".$IPDB::domain" if $IPDB::append_domain && $args{rdns} && $args{rdns} !~ /\./;
    21012112
    21022113  # In case of any container (mainly master block), only update freeblocks so we don't stomp subs
  • trunk/cgi-bin/MyIPDB.pm

    r893 r902  
    9797#$IPDB::billinglink = 'https://billing.example.com/radius.pl';
    9898
     99## Append default domain to unqualified DNS names?  (ie, names without dots)
     100# Disabling this can result in DNS names that get "lost", due to downconversion from A+PTR to PTR. 
     101#$IPDB::append_domain = 1;
     102
    99103## connectDB_My()
    100104# Wrapper for IPDB::connectDB
Note: See TracChangeset for help on using the changeset viewer.