You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/07 11:27:51 UTC

[GitHub] [incubator-nuttx-apps] XinStellaris commented on a diff in pull request #1312: netutils/dhcpc:receiving unexpected packet not leading to dhcp retry.

XinStellaris commented on code in PR #1312:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1312#discussion_r964726827


##########
netutils/dhcpc/dhcpc.c:
##########
@@ -720,13 +724,18 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult)
 
       /* Send the DISCOVER command */
 
-      ninfo("Broadcast DISCOVER\n");
-      if (dhcpc_sendmsg(pdhcpc, presult, DHCPDISCOVER) < 0)
+      if (last_send == 0 ||

Review Comment:
   The change is to prevent dhcp_send from burst send multiple discover.
   If not, every time we come back here we will send a dhcp. 
   This is bad when we are receiving un-wanted dhcp packets, then the do-while will  keep sending 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org