Changeset 902 for trunk/cgi-bin/IPDB.pm


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.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.