diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-06-28 12:22:56 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-06-28 17:00:29 +0200 |
commit | 50daffb784721ffa515bbee34bdcc5e1a1efed96 (patch) | |
tree | ec729a5d4e8acfb640050bb2a7b91858a77dc138 | |
parent | f95205f580c25bf90c9486ee679a61abebb48085 (diff) | |
download | strongswan-50daffb784721ffa515bbee34bdcc5e1a1efed96.tar.bz2 strongswan-50daffb784721ffa515bbee34bdcc5e1a1efed96.tar.xz |
dhcp: Use chunk_hash_static() to calculate ID-based MAC addresses
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libcharon/plugins/dhcp/dhcp_socket.c b/src/libcharon/plugins/dhcp/dhcp_socket.c index 46d4c64ef..72e6ff4da 100644 --- a/src/libcharon/plugins/dhcp/dhcp_socket.c +++ b/src/libcharon/plugins/dhcp/dhcp_socket.c @@ -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 { diff --git a/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dhcp/dhcpd.conf b/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dhcp/dhcpd.conf index cdade2f2e..97c5efac6 100644 --- a/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dhcp/dhcpd.conf +++ b/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dhcp/dhcpd.conf @@ -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; } diff --git a/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dnsmasq.conf b/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dnsmasq.conf index 61d31a0ba..ed28c69ac 100644 --- a/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dnsmasq.conf +++ b/testing/tests/ikev2/dhcp-static-mac/hosts/venus/etc/dnsmasq.conf @@ -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 |