From 62ae9db68596ef612a62bf2626889078c075fb43 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 18 Jan 2012 13:23:46 +0100 Subject: [PATCH] dsa-check-zone-rrsig-expiration: configurable packet size, and change default size --- .../checks/dsa-check-zone-rrsig-expiration | 10 ++++++---- dsa-nagios-checks/debian/changelog | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) 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); diff --git a/dsa-nagios-checks/debian/changelog b/dsa-nagios-checks/debian/changelog index 2ca6139..5fd8237 100644 --- a/dsa-nagios-checks/debian/changelog +++ b/dsa-nagios-checks/debian/changelog @@ -1,13 +1,15 @@ dsa-nagios-checks (9X) Xnstable; urgency=low - * + [ Peter Palfrader ] + * dsa-check-zone-rrsig-expiration: configurable packet size, and change + default size. - -- Martin Zobel-Helas Sat, 07 Jan 2012 17:17:50 +0100 + -- Peter Palfrader Wed, 18 Jan 2012 13:23:16 +0100 dsa-nagios-checks (90) unstable; urgency=low [ Peter Palfrader ] - * dsa-check-entropy: + * dsa-check-entropy: - document watermark default - fix off-by-one in output * dsa-check-backuppg: @@ -23,7 +25,7 @@ dsa-nagios-checks (90) unstable; urgency=low * Add dsa-check-raid-megactl for awkward PeRC controllers [ Martin Zobel-Helas ] - * add rudimentary check for unowned files + * add rudimentary check for unowned files -- Martin Zobel-Helas Mon, 02 Jan 2012 16:46:33 +0100 -- 2.20.1