Problem: Based on the README, if -k option is set, a RELEASE message
should not be sent when the process is stopped. RELEASE messages are
also not sent in case of a forced RELEASE or reconfiguration, however.
Solution: Stop the transmission of RELEASE messages when the process is
stopped but allow it for a forced RELEASE or reconfiguration.
Signed-off-by: Nicolas BESNARD <[email protected]>
Signed-off-by: Paul Donald <[email protected]>
Link: https://github.com/openwrt/odhcp6c/pull/106
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
notify_state_change("unbound", 0, true);
}
- if (server_id_len > 0 && (ia_pd_len > 0 || ia_na_len > 0) && config_dhcp->release)
+ if (server_id_len > 0 && (ia_pd_len > 0 || ia_na_len > 0) && (!signal_term || config_dhcp->release))
dhcpv6_send_request(DHCPV6_MSG_RELEASE);
odhcp6c_clear_state(STATE_IA_NA);
odhcp6c_clear_state(STATE_IA_PD);
- if (!signal_usr2) {
+ if (signal_term) {
terminate = true;
} else {
signal_usr2 = false;