X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=e99195840f96ed5a7474f01f35dc288ba9c42f07;hp=da920ce21c06aa405feee11652f7317502d1a5a2;hb=9e52c4de4476a99129b4ab2402898dd9af92e86c;hpb=c09c3a329536fb3117be282f7b4686bf872a7d83 diff --git a/src/dhcpv6.c b/src/dhcpv6.c index da920ce..e991958 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -520,7 +520,7 @@ static int dhcpv6_handle_advert(_unused enum dhcpv6_msg orig, 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) {