diff options
author | Steven Barth <steven@midlink.org> | 2014-03-11 09:17:08 +0100 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-03-11 09:17:08 +0100 |
commit | 4b23559937ccefd2df7d020219c7962568355a12 (patch) | |
tree | ef0e1c00ccebbcc84c3dee39d8a15cba04177a06 | |
parent | 7a6a84175571603dc36a786d570ac33171b82532 (diff) |
Fix HMAC-MD5 in DHCPv6-reconfigure (thx rsmarples)
-rw-r--r-- | src/dhcpv6-ia.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index b1931ef..0d132af 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -162,8 +162,9 @@ static int send_reconf(struct interface *iface, struct dhcpv6_assignment *assign struct iovec iov = {&reconf_msg, sizeof(reconf_msg) - 128 + assign->clid_len}; md5_ctx_t md5; - uint8_t secretbytes[16]; - memcpy(secretbytes, assign->key, sizeof(secretbytes)); + uint8_t secretbytes[64]; + memset(secretbytes, 0, sizeof(secretbytes)); + memcpy(secretbytes, assign->key, sizeof(assign->key)); for (size_t i = 0; i < sizeof(secretbytes); ++i) secretbytes[i] ^= 0x36; |