diff src/dnsbl.h @ 252:836b7f2357f9

need ntohl() before using masks that are defined in host byte order
author Carl Byington <carl@five-ten-sg.com>
date Sun, 08 Apr 2012 16:10:31 -0700
parents 15bf4f68a0b2
children d11b529ce9c5
line wrap: on
line diff
--- a/src/dnsbl.h	Sun Apr 08 11:56:00 2012 -0700
+++ b/src/dnsbl.h	Sun Apr 08 16:10:31 2012 -0700
@@ -12,6 +12,7 @@
 #include "context.h"
 #include "spamass.h"
 #include "dccifd.h"
+#include <stdint.h>
 
 extern int debug_syslog;
 #define dccbulk 1000
@@ -31,7 +32,7 @@
     CONFIG  *pc;                            // global filtering configuration
     int     fd;                             // to talk to dns resolver process
     bool    err;                            // did we get any errors on the resolver socket?
-    int32_t ip;                             // ip4 address of the smtp client
+    uint32_t ip;                            // ip4 address of the smtp client in network order
     const char      *helo;                  // helo from client
     map<DNSBLP, bool> checked_black;        // map of dnsblp to result of (ip listed on that dnsbl)
     map<DNSWLP, bool> checked_white;        // map of dnswlp to result of (ip listed on that dnswl)