projects
/
oweals
/
odhcpd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a6a841
)
Fix HMAC-MD5 in DHCPv6-reconfigure (thx rsmarples)
author
Steven Barth
<steven@midlink.org>
Tue, 11 Mar 2014 08:17:08 +0000
(09:17 +0100)
committer
Steven Barth
<steven@midlink.org>
Tue, 11 Mar 2014 08:17:08 +0000
(09:17 +0100)
src/dhcpv6-ia.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6-ia.c
b/src/dhcpv6-ia.c
index b1931ef5f55ba225fe344826f08edc55defa6b55..0d132afeccba779e474e79d90a0486a10cfeaa82 100644
(file)
--- 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;