mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-18 08:47:00 +00:00
bug: use uint32_t for IP numbers
There where long and unsigned long used for IPs in use which caused occasional off by one errors. The word occasional should be read: pretty much every one with large enough configuration has been affected. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
3c1d033a79
commit
1e82461875
5 changed files with 23 additions and 19 deletions
|
|
@ -37,6 +37,7 @@
|
|||
# define DHCPD_POOLS_H 1
|
||||
|
||||
#include <config.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/* Feature test switches */
|
||||
|
|
@ -103,8 +104,8 @@ struct shared_network_t {
|
|||
};
|
||||
struct range_t {
|
||||
struct shared_network_t *shared_net;
|
||||
unsigned long int first_ip;
|
||||
unsigned long int last_ip;
|
||||
uint32_t first_ip;
|
||||
uint32_t last_ip;
|
||||
unsigned long int count;
|
||||
unsigned long int touched;
|
||||
unsigned long int backups;
|
||||
|
|
@ -132,13 +133,13 @@ unsigned int num_shared_networks;
|
|||
struct range_t *ranges;
|
||||
unsigned int num_ranges;
|
||||
|
||||
unsigned long int *leases;
|
||||
uint32_t *leases;
|
||||
unsigned long int num_leases;
|
||||
|
||||
unsigned long int *touches;
|
||||
uint32_t *touches;
|
||||
unsigned long int num_touches;
|
||||
|
||||
unsigned long int *backups;
|
||||
uint32_t *backups;
|
||||
unsigned long int num_backups;
|
||||
|
||||
struct macaddr_t *macaddr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue