Problem scripting dynamic updates to "subdomain"

Ronan Flood ronan at noc.ulcc.ac.uk
Wed Jul 14 11:57:21 UTC 2004


"Rich Parkin" <RParkin at ldmi.com> wrote:

[... snip lots ...]

> I'm guessing that the answer lies somewhere in the difference between
> ldmi.net and its' pseudo-subdomains like sample.ldmi.net and how
> Net::DNS constructs the request.

Well, ldmi.net is a zone, sample.ldmi.net isn't.

>     # Create the update packet
>     my $update = Net::DNS::Update->new($zone);
>     
>     # Set prerequisite
>     $update->push(pre => nxrrset("$zone MX $mxpri $mxname"));
>     
>     # Add record to packet
>     $update->push(update => rr_add("$zone MX $mxpri $mxname"));

Assuming $zone is "sample.ldmi.net", you're creating an update
for sample.ldmi.net; I think you need to have

  my $update = Net::DNS::Update->new("ldmi.net.");

or extract the zone name from your $zone appropriately.

> One other thing I need to mention is that the vendor is setting the
> following options and I am not:
> 
> dnssrch(0) #don't use search list
> defnames(0) #don't append default to domain names
> 
> I suppose I could, but I don't see why they would make a difference
> when the variables in Net::DNS are holding the correct values.  (and in
> fact, they don't make a difference when I put them in)

That might depend on whether or not the names in your variables are
fully-qualified and terminated with '.' -- try and see.

-- 
                      Ronan Flood <R.Flood at noc.ulcc.ac.uk>
                        working for but not speaking for
             Network Services, University of London Computer Centre
     (which means: don't bother ULCC if I've said something you don't like)


More information about the bind-users mailing list