[Mon-commit] mon/mon.d dns.monitor,1.1.1.1,1.1.1.1.2.1
Brought to you by:
trockij
From: Jim T. <tr...@us...> - 2004-07-12 15:50:37
|
Update of /cvsroot/mon/mon/mon.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12228 Modified Files: Tag: mon-1-0-0pre1 dns.monitor Log Message: added -tcp flag, suggested by Kevin Ivory <Iv...@Se...> Index: dns.monitor =================================================================== RCS file: /cvsroot/mon/mon/mon.d/dns.monitor,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1 *** dns.monitor 9 Jun 2004 05:18:05 -0000 1.1.1.1 --- dns.monitor 12 Jul 2004 15:50:25 -0000 1.1.1.1.2.1 *************** *** 26,34 **** =head1 SYNOPSIS ! B<dns.monitor> I<-zone zone [-zone zone ...]> I<-master master> I<[-serial_threshold num]> I<server [server ...]> or ! B<dns.monitor> I<-caching_only> I<-query record[:type] [-query record[:type] ...]> I<server [server ...]> =head1 DESCRIPTION --- 26,34 ---- =head1 SYNOPSIS ! B<dns.monitor> I<-zone zone [-zone zone ...]> I<-master master> I<[-serial_threshold num]> I<[-tcp]> I<server [server ...]> or ! B<dns.monitor> I<-caching_only> I<[-tcp]> I<-query record[:type] [-query record[:type] ...]> I<server [server ...]> =head1 DESCRIPTION *************** *** 48,52 **** propagation, or on Dynamic DNS zones which may be updated hundreds or thousands of times an hour) It is assumed that each I<server> is ! supposed to be authoritative for the I<zone>. In caching mode, specified via the I<-caching_only> switch, B<dns.monitor> --- 48,53 ---- propagation, or on Dynamic DNS zones which may be updated hundreds or thousands of times an hour) It is assumed that each I<server> is ! supposed to be authoritative for the I<zone>. The I<-tcp> option ! will cause lookups to be done via TCP instead of the default UDP. In caching mode, specified via the I<-caching_only> switch, B<dns.monitor> *************** *** 87,97 **** my($SerialThreshold) = (0); my($CachingServer) = (0); my(%OptVars) = ("master" => \$Master, "zone" => \@Zones, "serial_threshold" => \$SerialThreshold, "caching_only" => \$CachingServer, ! "query" => \@Queries); ! if (!GetOptions(\%OptVars, "master=s", "zone=s@", "serial_threshold=s", "caching_only", "query=s@")) { print STDERR "Problems with Options, sorry\n"; exit -1; --- 88,100 ---- my($SerialThreshold) = (0); my($CachingServer) = (0); + my($UseTCP) = (0); my(%OptVars) = ("master" => \$Master, "zone" => \@Zones, "serial_threshold" => \$SerialThreshold, "caching_only" => \$CachingServer, ! "query" => \@Queries, ! "tcp" => \$UseTCP); ! if (!GetOptions(\%OptVars, "master=s", "zone=s@", "serial_threshold=s", "caching_only", "tcp", "query=s@")) { print STDERR "Problems with Options, sorry\n"; exit -1; *************** *** 221,224 **** --- 224,228 ---- # Query the $Master for the SOA of $Zone and get the serial number. $res = new Net::DNS::Resolver; + $res->usevc(1) if ($UseTCP); $res->defnames(0); # don't append default zone $res->recurse(0); # no recursion *************** *** 257,260 **** --- 261,265 ---- foreach $server (@Servers) { $res = new Net::DNS::Resolver; + $res->usevc(1) if ($UseTCP); $res->defnames(0); # don't append default zone $res->recurse(0); # no recursion *************** *** 321,324 **** --- 326,330 ---- foreach $server (@Servers) { $res = new Net::DNS::Resolver; + $res->usevc(1) if ($UseTCP); $res->defnames(0); # don't append default zone $res->recurse(0); # no recursion |