~ubuntu-branches/ubuntu/gutsy/maradns/gutsy

« back to all changes in this revision

Viewing changes to update/1.2.12.08/maradns-1.2.12.07-improper_rotation.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2007-09-02 17:48:27 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070902174827-xbqk9d0z2315ybay
Tags: 1.2.12.08-1
* New upstream security release
* http://marc.info/?l=maradns-list&m=118842373527534&w=2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- maradns-1.2.12.07/server/MaraDNS.c  2007-08-16 10:25:04.000000000 -0500
 
2
+++ maradns-1.2.12.08/server/MaraDNS.c  2007-08-28 21:06:28.000000000 -0500
 
3
@@ -636,7 +636,8 @@
 
4
                is buggy if we round-robin rotate data when we allow more than
 
5
                one additional record to be create per answer/authoritative
 
6
                record.  */
 
7
-            if(rotate_2nd != 0 && max_ar_chain == 1 && rotate_last != 0) {
 
8
+            if(rotate_2nd != 0 && max_ar_chain == 1 && rotate_last != 0
 
9
+               && first_rr_type != RR_NS) {
 
10
                 /* If it makes sense to do a round-robin rotation, do so.
 
11
                 * Make rotate_1st, which was the first record, the last
 
12
                 * record; make rotate_2nd, which was the second record,
 
13
@@ -900,7 +901,8 @@
 
14
         rotate_last = where;
 
15
         where = where->next;
 
16
         /* If it makes sense to do a round-robin rotation, do so */
 
17
-        if(where == 0 && rotate_2nd != 0 && max_ar_chain == 1) {
 
18
+        if(where == 0 && rotate_2nd != 0 && max_ar_chain == 1
 
19
+           && first_rr_type != RR_NS) {
 
20
             /* For records in the cache, we need to make sure that
 
21
                the custodian properly points to the first record
 
22
                in the chain or we will leak memory */
 
23
@@ -1113,7 +1115,8 @@
 
24
                is buggy if we round-robin rotate data when we allow more than
 
25
                one additional record to be create per answer/authoritative
 
26
                record.  */
 
27
-            if(rotate_2nd != 0 && max_ar_chain == 1 && rotate_done == 0) {
 
28
+            if(rotate_2nd != 0 && max_ar_chain == 1 && rotate_done == 0
 
29
+               && first_rr_type != RR_NS) {
 
30
                 rotate_done = 1;
 
31
                 /* If it makes sense to do a round-robin rotation */
 
32
                 rotate_1st->next = where;