Changeset 833 for trunk


Ignore:
Timestamp:
04/19/22 13:55:07 (3 years ago)
Author:
Kris Deugau
Message:

/trunk

Handle an edge case with SRV records - target host of "." explicitly
specifies "this service does not exist"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r832 r833  
    33##
    44# $Id$
    5 # Copyright 2008-2021 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2008-2022 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    10831083
    10841084    # SRV target check - IP addresses not allowed.  Must be a more or less well-formed hostname.
     1085    # Allow a bare . to indicate "this service does not exist"
    10851086    return ('FAIL', "SRV records cannot point directly to an IP address")
    1086       if ${$args{val}} =~ /^(?:[\d.]+|[0-9a-fA-F:]+)$/;
     1087      if ${$args{val}} ne '.' && ${$args{val}} =~ /^(?:[\d.]+|[0-9a-fA-F:]+)$/;
    10871088  } else {
    10881089    # hm.  we can't do anything sane with IP values here;  part of the record data is in
     
    10981099
    10991100    # SRV target check - IP addresses not allowed.  Must be a more or less well-formed hostname.
     1101    # Allow a bare . to indicate "this service does not exist"
    11001102    return ('FAIL', "SRV records cannot point directly to an IP address")
    1101       if ${$args{host}} =~ /^(?:[\d.]+|[0-9a-fA-F:]+)$/;
     1103      if ${$args{host}} ne '.' && ${$args{host}} =~ /^(?:[\d.]+|[0-9a-fA-F:]+)$/;
    11021104
    11031105    # SRV records in reverse zones get stricter treatment.  The UI bars adding them in
Note: See TracChangeset for help on using the changeset viewer.