dhcp6: Fix DHCPv6 client file descriptor and event handling (#7796)
Close DHCPv6 client socket file descriptor when sd_dhcp6_client_stop() is called and not when client_reset() is called. If left in client_reset(), any internal temporary stopping of the DHCPv6 client with client_stop() will call client_reset() after which the DHCPv6 client will not be able to receive any further DHCPv6 messages. Similarly, client_start() needs to enable events for the DHCPv6 socket file descriptor since a call to client_stop() will call client_reset() which will remove it from the main loop. Events should be turned off when no DHCPv6 messages are expected.
Loading