Commits

Ivan Vučica  committed d9a2676

Corrected a lack of the address operator in --randomize-ip code.

  • Participants
  • Parent commits 9a1a0c1

Comments (0)

Files changed (1)

 							 symbol in device name. dev name is always a three-letter 'tap'
 							 + number, and let's just presume it's a single digit num */
 
-			uint32_t *ip_int = (uint32_t*)ip;
-			uint32_t *netmask_int = (uint32_t*)netmask;
+			uint32_t *ip_int = (uint32_t*)&ip;
+			uint32_t *netmask_int = (uint32_t*)&netmask;
 			
 			uint32_t local = (uint32_t)rand() & ~*netmask_int;
 			if(local == 0)
 				local = 1;
 
 			*ip_int |= local;
-			DEBUG("randomized ip address: %s", inet_ntoa(*(struct in_addr*)ip));
+			DEBUG("randomized ip address: %s", inet_ntoa(*(struct in_addr*)&ip));
 		}
 		else
 			break;