mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-17 08:16:59 +00:00
IPv6: add DHCPv6 support
The DHCP version is determined according to the first IP address that appears in the configuration file. Caveat; counters are of native long type. Since IPv6 address space has 2^128 addresses, they are subject to overflow. [Sami Kerola: This commit also fixed a percent sorting bug, which has been broken always. See changes ret_percent() for the fix.] CC: LI Zimu <lzm@cernet.edu.cn> CC: Xing Li <xing@cernet.edu.cn> Reviewed-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Cheer Xiao <xiaqqaix@gmail.com>
This commit is contained in:
parent
71bcee14e9
commit
a57d399643
8 changed files with 267 additions and 119 deletions
|
|
@ -239,6 +239,14 @@ int main(int argc, char **argv)
|
|||
/* Global allocations, counter resets etc */
|
||||
int prepare_memory(void)
|
||||
{
|
||||
/* Fill in prefix length cache */
|
||||
int i, j;
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < NUM_OF_PREFIX; j++) {
|
||||
prefix_length[i][j] = strlen(prefixes[i][j]);
|
||||
}
|
||||
}
|
||||
dhcp_version = VERSION_UNKNOWN;
|
||||
RANGES = 64;
|
||||
num_ranges = num_shared_networks = 0;
|
||||
shared_networks =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue