dhcp: Use chunk_hash_static() to calculate ID-based MAC addresses
This commit is contained in:
@@ -227,7 +227,7 @@ static int prepare_dhcp(private_dhcp_socket_t *this,
|
|||||||
/* with ID specific postfix */
|
/* with ID specific postfix */
|
||||||
if (this->identity_lease)
|
if (this->identity_lease)
|
||||||
{
|
{
|
||||||
id = htonl(chunk_hash(chunk));
|
id = htonl(chunk_hash_static(chunk));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ subnet 10.1.0.0 netmask 255.255.0.0 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
host carol {
|
host carol {
|
||||||
hardware ethernet 7a:a7:8f:fc:db:3b;
|
hardware ethernet 7a:a7:51:cc:22:4a;
|
||||||
fixed-address 10.1.0.30;
|
fixed-address 10.1.0.30;
|
||||||
}
|
}
|
||||||
|
|
||||||
host dave {
|
host dave {
|
||||||
hardware ethernet 7a:a7:35:78:bc:85;
|
hardware ethernet 7a:a7:93:70:2b:21;
|
||||||
fixed-address 10.1.0.40;
|
fixed-address 10.1.0.40;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
interface=eth0
|
interface=eth0
|
||||||
dhcp-range=10.1.0.50,10.1.0.60,255.255.0.0,10.1.255.255
|
dhcp-range=10.1.0.50,10.1.0.60,255.255.0.0,10.1.255.255
|
||||||
dhcp-host=7a:a7:8f:fc:db:3b,10.1.0.30
|
dhcp-host=7a:a7:51:cc:22:4a,10.1.0.30
|
||||||
dhcp-host=7a:a7:35:78:bc:85,10.1.0.40
|
dhcp-host=7a:a7:93:70:2b:21,10.1.0.40
|
||||||
dhcp-option=option:router,PH_IP_MOON1
|
dhcp-option=option:router,PH_IP_MOON1
|
||||||
dhcp-option=option:dns-server,PH_IP_VENUS
|
dhcp-option=option:dns-server,PH_IP_VENUS
|
||||||
dhcp-option=option:netbios-ns,PH_IP_ALICE
|
dhcp-option=option:netbios-ns,PH_IP_ALICE
|
||||||
|
|||||||
Reference in New Issue
Block a user