소스 검색

[dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER

A missing test for dhcp->dhcpoffer in dhcp_timer_expired() was causing
the client to transition to DHCPREQUEST after timing out on waiting
for ProxyDHCP even if no DHCPOFFERs had been received.
tags/v0.9.4
Michael Brown 16 년 전
부모
커밋
3a2c8a2690
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/net/udp/dhcp.c

+ 1
- 1
src/net/udp/dhcp.c 파일 보기

@@ -932,7 +932,7 @@ static void dhcp_timer_expired ( struct retry_timer *timer, int fail ) {
932 932
 	}
933 933
 
934 934
 	/* Give up waiting for ProxyDHCP before we reach the failure point */
935
-	if ( elapsed > PROXYDHCP_WAIT_TIME ) {
935
+	if ( dhcp->dhcpoffer && ( elapsed > PROXYDHCP_WAIT_TIME ) ) {
936 936
 		if ( dhcp->state == DHCP_STATE_DISCOVER ) {
937 937
 			dhcp_set_state ( dhcp, DHCP_STATE_REQUEST );
938 938
 			return;

Loading…
취소
저장