odhcp6c: implement asynchronous handling for DHCPv6 State
authorNicolas BESNARD <[email protected]>
Tue, 29 Oct 2024 10:27:13 +0000 (10:27 +0000)
committerÁlvaro Fernández Rojas <[email protected]>
Mon, 3 Nov 2025 15:14:49 +0000 (16:14 +0100)
commit2f609f248faf79d7a8965cfc3f04eb2c62ba9408
tree990bd054dbce4a0dad8d79909b466aaa2c50492f
parent6466314e7f623fffd2a9d00a87e8902fad0dfadf
odhcp6c: implement asynchronous handling for DHCPv6 State

Problem:
    The DHCPv6 states were previously handled synchronously, meaning
    that while waiting for a response from the server, no other actions
    could be performed in odhcp6c.

    The process would block inside a loop until a valid response was
    received, limiting responsiveness and overall system performance.

Solution:
    The new approach involves sending the requests and then
    asynchronously monitoring the DHCPv6 socket using poll(). By reading
    a response only when there is data available on the socket, the
    system remains non-blocking.

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]>
src/dhcpv6.c
src/odhcp6c.c
src/odhcp6c.h