dns/dnswalk: Unbreak port

Deprecated Perl syntax was preventing the port from working.

Approved by:	portmgr
MFH:		2017Q2
This commit is contained in:
Mark Felder 2017-05-12 19:48:17 +00:00
parent 001ba7f818
commit ee991a5121
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=440707
2 changed files with 33 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= dnswalk
PORTVERSION= 2.0.2
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= dns
MASTER_SITES= SF

View File

@ -0,0 +1,32 @@
--- dnswalk.orig 2017-05-12 19:34:32 UTC
+++ dnswalk
@@ -56,9 +56,9 @@ sub dowalk {
return unless $domain;
print "Checking $domain\n";
@subdoms=&doaxfr($domain);
- &check_zone($domain) if (defined(@zone) && @zone);
+ &check_zone($domain) if (@zone);
undef @zone;
- return if (!(defined(@subdoms) && @subdoms));
+ return if (! @subdoms);
@sortdoms = sort byhostname @subdoms;
local ($subdom);
if ($opt_r) {
@@ -84,7 +84,7 @@ sub doaxfr {
my $res = new Net::DNS::Resolver;
$res->nameservers($server);
@zone=$res->axfr($domain);
- unless (defined(@zone) && @zone) {
+ unless (@zone) {
print STDERR "failed\n";
&printerr("FAIL",
"Zone transfer of $domain from $server failed: ".
@@ -104,7 +104,7 @@ sub doaxfr {
print STDERR "done.\n";
last SERVER;
} # foreach #
- unless (defined(@zone) && @zone) {
+ unless (@zone) {
&printerr("BAD","All zone transfer attempts of $domain failed!\n");
return undef;
}