aboutsummaryrefslogtreecommitdiffstats
path: root/dns/dnswalk/files/patch-dnswalk
blob: d9f84ad83049e507d4b668305feea27f3cc8b169 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
     }