[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maradns-list
Subject:    [MARA] Patch for MaraDNS 1.1 for MX preference problem
From:       Sam Trenholme <sam+i7tq5rg () chaosring ! org>
Date:       2005-07-01 2:05:07
Message-ID: 20050701020507.41E46D742B8 () mail ! chaosring ! org
[Download RAW message or body]

This is a fix for the MX preference problem in getzone and fetchzone
for the MaraDNS 1.1 branch.

- Sam

diff -ur maradns-1.1.42/tcp/fetchzone.c maradns-1.1.43/tcp/fetchzone.c
--- maradns-1.1.42/tcp/fetchzone.c	2005-06-07 22:36:36.000000000 -0700
+++ maradns-1.1.43/tcp/fetchzone.c	2005-06-30 18:52:48.728433440 -0700
@@ -310,7 +310,7 @@
                     mxexpand = js_create(512,1);
 		    if(mxexpand == 0)
                         goto failover;
-                    preference = ((*(get->string) & 0xff00) << 8) |
+                    preference = ((*(get->string) & 0xff) << 8) |
 		                  (*(get->string + 1) & 0xff);
                     if(js_substr(get,mxexpand,2,get->unit_count - 2) 
                        == JS_ERROR) 
diff -ur maradns-1.1.42/tcp/getzone.c maradns-1.1.43/tcp/getzone.c
--- maradns-1.1.42/tcp/getzone.c	2005-06-07 22:32:59.000000000 -0700
+++ maradns-1.1.43/tcp/getzone.c	2005-06-30 18:52:33.061815128 -0700
@@ -296,7 +296,7 @@
                     mxexpand = js_create(512,1);
 		    if(mxexpand == 0)
                         goto failover;
-                    preference = ((*(get->string) & 0xff00) << 8) |
+                    preference = ((*(get->string) & 0xff) << 8) |
 		                  (*(get->string + 1) & 0xff);
                     if(js_substr(get,mxexpand,2,get->unit_count - 2) 
                        == JS_ERROR) 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic