DHCP Renew Failure:
When connmand doing DHCP renew, we found out sometimes the DHCP ACK was lost.
But the DHCP ACK packet was received in the IP layer. The tcpdump shows the packet,
but the packet isn't passed to the glib and connmand.
Failure Reason:
The packet was routed to the wrong socket. Connmand created 2 sockets to do the DHCP
renew.
One is for listening the received DHCP ACK(dhcp_l3_socket), the other is to transmit the
DHCP request(dhcp_send_kernel_packet). The transmit socket is closed immediately when the
request is transmitted. Normally, the socket is closed before DHCP ACK is received, so
the
DHCP ACK is routed to the listening socket. But when adding some debug information in the
kernel,
we found in some cases, the socket was closed after DHCP ACK arrived. In this case, the
packet
was routed to the transmitting socket, because it has a better match result. But the
connmand
only listen on the listening socket, and this packet was dropped when the socket was
closed.
Proposed Fix:
Use one socket to listen and transmit similar to NTP implementation. When doing the DHCP
renew,
use the listening socket to transmit request. The new code will create a new socket if no
socket
opened(current code) in the DHCP release case, else it will use existing socket in the
DHCP renew case.
I attached the patch in the next email.
Show replies by date