aboutsummaryrefslogtreecommitdiff
path: root/dns/powerdns-devel/files/patch-pdns_iputils_hh
blob: 1dcd09077f3300c27ca35a908d049c81fd5382a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- pdns/iputils.hh.orig	Sat Aug 30 16:27:48 2003
+++ pdns/iputils.hh		Mon Nov 10 17:27:02 2003
@@ -51,10 +51,13 @@
   Netmask(const string &mask) 
   {
     char *p;
-    char bits=32;
+    u_int8_t bits=32;
+    d_mask=0xFFFFFFFF;
+
     if((p=strchr(mask.c_str(),'/')))
-      bits=atoi(p+1);
+      bits = (u_int8_t) atoi(p+1);
 
+    if( bits < 32 )
     d_mask=~(0xFFFFFFFF>>bits);
 
     struct in_addr a;