dhcp: Use chunk_hash_static() to calculate ID-based MAC addresses

This commit is contained in:
Tobias Brunner
2013-06-28 17:00:29 +02:00
parent f95205f580
commit 50daffb784
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -227,7 +227,7 @@ static int prepare_dhcp(private_dhcp_socket_t *this,
/* with ID specific postfix */
if (this->identity_lease)
{
id = htonl(chunk_hash(chunk));
id = htonl(chunk_hash_static(chunk));
}
else
{
@@ -14,11 +14,11 @@ subnet 10.1.0.0 netmask 255.255.0.0 {
}
host carol {
hardware ethernet 7a:a7:8f:fc:db:3b;
hardware ethernet 7a:a7:51:cc:22:4a;
fixed-address 10.1.0.30;
}
host dave {
hardware ethernet 7a:a7:35:78:bc:85;
hardware ethernet 7a:a7:93:70:2b:21;
fixed-address 10.1.0.40;
}
@@ -1,7 +1,7 @@
interface=eth0
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:35:78:bc:85,10.1.0.40
dhcp-host=7a:a7:51:cc:22:4a,10.1.0.30
dhcp-host=7a:a7:93:70:2b:21,10.1.0.40
dhcp-option=option:router,PH_IP_MOON1
dhcp-option=option:dns-server,PH_IP_VENUS
dhcp-option=option:netbios-ns,PH_IP_ALICE