From 98045e630ab1c728e48a6cb8bcacbcd7e09dd085 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 21 May 2013 10:25:33 +0200 Subject: [PATCH] Fix reconfigure accept option transmission --- src/dhcpv6.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index 9b4247c..cfa5a40 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -309,7 +309,7 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) {&oro_refresh, 0}, {cl_id, cl_id_len}, {srv_id, srv_id_len}, - {&reconf_accept, 0}, + {&reconf_accept, sizeof(reconf_accept)}, {&fqdn, fqdn_len}, {&hdr_ia_na, sizeof(hdr_ia_na)}, {ia_na, ia_na_len}, @@ -327,9 +327,8 @@ static void dhcpv6_send(enum dhcpv6_msg type, uint8_t trid[3], uint32_t ecs) } // Disable IAs if not used - if (type == DHCPV6_MSG_SOLICIT) { - iov[5].iov_len = sizeof(reconf_accept); - } else if (type != DHCPV6_MSG_REQUEST) { + if (type != DHCPV6_MSG_REQUEST && type != DHCPV6_MSG_SOLICIT) { + iov[5].iov_len = 0; if (ia_na_len == 0) iov[7].iov_len = 0; if (ia_pd_len == 0) -- 2.39.5