]> git.decadent.org.uk Git - odhcp6c.git/blobdiff - src/dhcpv6.c
dhcpv6: remove dead code
[odhcp6c.git] / src / dhcpv6.c
index 425aee1987d5ae6c19c20eb13a3d64e372036fbf..cc286271519942bac3595d1edb11adf3cc27f02c 100644 (file)
@@ -793,18 +793,6 @@ static int dhcpv6_handle_advert(enum dhcpv6_msg orig, const int rc,
                if (otype == DHCPV6_OPT_SERVERID && olen <= 130) {
                        memcpy(cand.duid, odata, olen);
                        cand.duid_len = olen;
-               } else if (otype == DHCPV6_OPT_STATUS && olen >= 2) {
-                       int error = ((int)odata[0] << 8 | (int)odata[1]);
-
-                       switch (error) {
-                       case DHCPV6_NoPrefixAvail:
-                               // Status code on global level
-                               cand.preference -= 2000;
-                               break;
-
-                       default :
-                               break;
-                       }
                } else if (otype == DHCPV6_OPT_PREF && olen >= 1 &&
                                cand.preference >= 0) {
                        cand.preference = pref = odata[0];
@@ -948,6 +936,7 @@ static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc,
                odhcp6c_clear_state(STATE_S46_MAPE);
                odhcp6c_clear_state(STATE_S46_LW);
                odhcp6c_clear_state(STATE_PASSTHRU);
+               odhcp6c_clear_state(STATE_CUSTOM_OPTS);
 
                // Parse and find all matching IAs
                dhcpv6_for_each_option(opt, end, otype, olen, odata) {