Skip to contentSkip to conversation

dhcp: fix T1 timeout crash

PATCH Applied James Prestwood 2 participants 2 messages Aug 6, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dhcp: fix T1 timeout crash

The timeout user data was being passed as the address to the client object, not the client object itself.

---
 ell/dhcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ell/dhcp.c +1 -1
index ca81311..22d903e 100644
@@ -985,7 +985,7 @@ static void dhcp_client_rx_message(const void *data, size_t len, void *userdata)
 		client->timeout_lease =
 			l_timeout_create_ms(dhcp_fuzz_secs(client->lease->t1),
 						dhcp_client_t1_expired,
-						&client, NULL);
+						client, NULL);
 
 		break;
 	case DHCP_STATE_INIT_REBOOT:
Signature · 1 line
2.17.1
#1 lore raw

Hi James,

Quoted 6 lines · James Prestwood

The timeout user data was being passed as the address to the client object, not the client object itself.

---
  ell/dhcp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Regards,
-Denis