~ubuntu-branches/ubuntu/raring/maradns/raring

« back to all changes in this revision

Viewing changes to update/1.3.07.06/maradns-1.3.08-askmara_tcp.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2010-01-24 12:17:40 UTC
  • mfrom: (1.1.13 upstream) (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100124121740-a4e1fjobwaouz443
Tags: 1.4.02-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- maradns-1.3.08/tools/askmara-tcp.c  2007-09-21 07:07:49.000000000 -0500
2
 
+++ maradns-1.3.09/tools/askmara-tcp.c  2007-10-12 09:00:30.000000000 -0500
3
 
@@ -473,6 +473,23 @@
4
 
                    L_DOT,*(uindata->string + *place + 2),
5
 
                    L_DOT,*(uindata->string + *place + 3),L_NEWLINE,L_NEWLINE);
6
 
             }
7
 
+        else if(rr_hdr.type == RR_AAAA) {
8
 
+            unsigned short *p;
9
 
+            if(uindata->unit_count < *place + 16)
10
 
+                return JS_ERROR;
11
 
+            /* Display the IP of the data */
12
 
+            /* Display the IP of the data */
13
 
+            p = (unsigned short*)(uindata->string + *place);
14
 
+            printf("%s%d%x:%x:%x:%x:%x:%x:%x:%x%s%s",L_IP,*(uindata->string + *place),
15
 
+                       htons(*(p + 0 )),
16
 
+                       htons(*(p + 1)),
17
 
+                       htons(*(p + 2)),
18
 
+                       htons(*(p + 3)),
19
 
+                       htons(*(p + 4)),
20
 
+                       htons(*(p + 5)),
21
 
+                       htons(*(p + 6)),
22
 
+                       htons(*(p + 7)),L_NEWLINE,L_NEWLINE);
23
 
+            }
24
 
         else if(rr_hdr.type == RR_TXT) {
25
 
             printf("%s",L_TXT); /* Text String */
26
 
             read_txt(uindata,mx.exchange,*place);
27
 
@@ -592,6 +609,7 @@
28
 
     escape_stdout(rr_hdr.name);
29
 
     /* We also show the type if this is an unsupported record type */
30
 
     if(rr_hdr.type != RR_A &&
31
 
+       rr_hdr.type != RR_AAAA &&
32
 
        rr_hdr.type != RR_NS &&
33
 
        rr_hdr.type != RR_CNAME &&
34
 
        rr_hdr.type != RR_SOA &&
35
 
@@ -642,6 +660,23 @@
36
 
                L_DOT,*(uindata->string + *place + 2),
37
 
                L_DOT,*(uindata->string + *place + 3));
38
 
         }
39
 
+    else if(rr_hdr.type == RR_AAAA) {
40
 
+        unsigned short *p;
41
 
+        if(uindata->unit_count < *place + 16)
42
 
+            return JS_ERROR;
43
 
+        /* Display the IP of the data */
44
 
+        /* Display the IP of the data */
45
 
+        p = (unsigned short*)(uindata->string + *place);
46
 
+        printf("|%x:%x:%x:%x:%x:%x:%x:%x\n",
47
 
+                   htons(*(p + 0 )),
48
 
+                   htons(*(p + 1)),
49
 
+                   htons(*(p + 2)),
50
 
+                   htons(*(p + 3)),
51
 
+                   htons(*(p + 4)),
52
 
+                   htons(*(p + 5)),
53
 
+                   htons(*(p + 6)),
54
 
+                   htons(*(p + 7)));
55
 
+        }
56
 
     else if(rr_hdr.type == RR_TXT) {
57
 
         printf("|");
58
 
         read_txt(uindata,mx.exchange,*place);