dhcpv6: clear CUSTOM_OPTS in a more sane manner
authorSteven Barth <steven@midlink.org>
Tue, 9 Jun 2015 12:04:59 +0000 (14:04 +0200)
committerSteven Barth <steven@midlink.org>
Tue, 9 Jun 2015 12:04:59 +0000 (14:04 +0200)
Signed-off-by: Steven Barth <steven@midlink.org>
src/dhcpv6.c
src/script.c

index 425aee1987d5ae6c19c20eb13a3d64e372036fbf..760f2359a112e715330a5bc309261da0540193c7 100644 (file)
@@ -948,6 +948,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) {
index 219d034d82f75f75cbcd3da4d1e1ddd238d13d2f..dbdd89bd3c03d67d711b0e0da14528390c978bb8 100644 (file)
@@ -410,7 +410,4 @@ void script_call(const char *status)
                execv(argv[0], argv);
                _exit(128);
        }
-
-       // Delete lost prefixes and user opts
-       odhcp6c_clear_state(STATE_CUSTOM_OPTS);
 }