* fixes preference handling
* fixes custom client IDs
cand.preference -= 2000;
} else if (otype == DHCPV6_OPT_PREF && olen >= 1 &&
cand.preference >= 0) {
- cand.preference = odata[1];
+ cand.preference = odata[0];
} else if (otype == DHCPV6_OPT_RECONF_ACCEPT) {
cand.wants_reconfigure = true;
} else if (otype == DHCPV6_OPT_IA_PD && request_prefix) {
buf[0] = 0;
buf[1] = DHCPV6_OPT_CLIENTID;
buf[2] = 0;
- buf[4] = l;
+ buf[3] = l;
odhcp6c_add_state(STATE_CLIENT_ID, buf, l + 4);
} else {
help = true;