~samiam/MaraDNS

ref: 3.5.0002 MaraDNS/update/1.4.07/maradns-2.0.02-debian_bug_607739_fix.patch -rw-r--r-- 1.1 KiB View raw
db09084f — Sam Trenholme MaraDNS release 3.5.0002 5 months ago
                                                                                
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
33
34
35
36
37
38
--- maradns-2.0.02/server/MaraBigHash.c	2011-02-05 19:21:39.000000000 -0700
+++ maradns-2.0.03/server/MaraBigHash.c	2011-02-18 15:15:04.000000000 -0700
@@ -992,12 +992,33 @@
 */
 
 int warn_ddip(js_string *query) {
-    if(log_level == 0)
+    int a = 0, l = 0;
+    if(log_level == 0 || query == 0 || query->string == 0)
         return JS_SUCCESS;
     /* "Dotted decimal IP for NS, CNAME, or MX does not work with some DNS servers" */
     printf("%s%s",L_DDIP_WARN,L_F);
-    return JS_SUCCESS;
+    printf("Hostname of record with problem: ");
+    for(a = 0 ; a < query->unit_count ; a++) {
+	l = *(query->string + a);
+        if(l < 1 || l > 64) {
+	    printf("\n");
+	    return JS_SUCCESS;
+	}
+	for(;l>0;l--) {
+            char c;
+	    a++;
+            c = *(query->string + a);
+            if(c>' ' && c < '~') {
+                printf("%c",c);
+            } else {
+                printf("~");
+	    }
+        } 
+        printf(".");
     }
+    printf("\n");
+    return JS_SUCCESS;
+}   
 
 /* Synthesize a DDIP record, just in case a MX, NS, or CNAME points to a
    dotted-decimal IP