Testsuite: take care with the net-10 zonefile when operating in that area
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 1 Oct 2019 20:36:33 +0000 (21:36 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 1 Oct 2019 20:36:33 +0000 (21:36 +0100)
test/runtest
test/src/server.c

index 45ee6e208b173bd609893a89f555add5d9aaadd2..28976f03f918249d18dc1477148fb5784e6ea99b 100755 (executable)
@@ -3913,14 +3913,25 @@ if ($have_ipv4 || $have_ipv6)
 if ($have_ipv4 && $parm_ipv4 ne "127.0.0.1")
   {
   my(@components) = $parm_ipv4 =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)/;
-  open(OUT, ">$parm_cwd/dnszones/db.ip4.$components[0]") ||
-    tests_exit(-1,
-      "Failed  to open $parm_cwd/dnszones/db.ip4.$components[0]: $!");
-  print OUT "; This is a dynamically constructed fake zone file.\n" .
-    "; The zone is $components[0].in-addr.arpa.\n\n" .
-    "$components[3].$components[2].$components[1]  PTR  $parm_hostname.\n\n" .
-    "; End\n";
-  close(OUT);
+
+  if ($components[0]=='10')
+    {
+    open(OUT, ">>$parm_cwd/dnszones/db.ip4.$components[0]") ||
+      tests_exit(-1, "Failed  to open $parm_cwd/dnszones/db.ip4.$components[0]: $!");
+    print OUT "$components[3].$components[2].$components[1]  PTR  $parm_hostname.\n\n";
+    close(OUT);
+    } 
+  else
+    {
+    open(OUT, ">$parm_cwd/dnszones/db.ip4.$components[0]") ||
+      tests_exit(-1,
+       "Failed  to open $parm_cwd/dnszones/db.ip4.$components[0]: $!");
+    print OUT "; This is a dynamically constructed fake zone file.\n" .
+      "; The zone is $components[0].in-addr.arpa.\n\n" .
+      "$components[3].$components[2].$components[1]  PTR  $parm_hostname.\n\n" .
+      "; End\n";
+    close(OUT);
+    }
   }
 
 if ($have_ipv6 && $parm_ipv6 ne "::1")
index ba731625b3733fca1234f280655e20568952bc96..4cf1260687d640d49e34bc6e4f9a4f296f35b377 100644 (file)
@@ -278,7 +278,7 @@ if (initial_pause > 0)
 
 if (port == 0)  /* Unix domain */
   {
-  if (debug) printf("%d: Creating Unix domain socket\n", time(NULL));
+  if (debug) printf("%l: Creating Unix domain socket\n", (long) time(NULL));
   listen_socket[udn] = socket(PF_UNIX, SOCK_STREAM, 0);
   if (listen_socket[udn] < 0)
     {