X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-zone-rrsig-expiration;h=8ea5d51fde6aaae67a3d2e2e0f3f9172cd5ad8de;hb=d6e0e373c910d25d8b89a0f34f777304132e807c;hp=06c4eccc2321bf4369bb90ac91ba1e9baf4cf253;hpb=b81e3901dc4beb62c4d4d784adcc3c1f41080965;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration b/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration index 06c4ecc..8ea5d51 100755 --- a/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration +++ b/dsa-nagios-checks/checks/dsa-check-zone-rrsig-expiration @@ -41,6 +41,8 @@ # Copyright (c) 2010 Peter Palfrader # - various fixes and cleanups # - do more than one zone +# Copyright (c) 2012 Peter Palfrader +# - add -s option to configure udp packet size. default changed from 4k to 1k # usage @@ -89,8 +91,8 @@ sub convert_time { return $ticks; } -my %opts = (t=>30); -getopts('hdt:c:w:', \%opts); +my %opts = (t=>30, s=>1024); +getopts('hdt:c:w:s:', \%opts); usage() unless scalar @ARGV == 1; usage() if $opts{h}; my $zone = $ARGV[0]; @@ -136,7 +138,7 @@ sub do_recursion { print STDERR "sending query for $zone RRSIG to $ns\n" if $opts{d}; $res->nameserver($ns); $res->udp_timeout($opts{t}); - $res->udppacketsize(4096); + $res->udppacketsize($opts{s}); $pkt = $res->send($zone, 'RRSIG'); last if $pkt; } @@ -281,7 +283,7 @@ sub send_query { $res->nameserver($server) if $server; $res->udp_timeout($opts{t}); $res->retry(2); - $res->udppacketsize(4096); + $res->udppacketsize($opts{s}); my $pkt = $res->send($qname, $qtype); unless ($pkt) { $res->usevc(1);