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/07/09 01:18:52 UTC

[GitHub] [incubator-nuttx-apps] normanr commented on pull request #904: netutils/dhcpc: add non-blocking interface

normanr commented on PR #904:
URL: https://github.com/apache/incubator-nuttx-apps/pull/904#issuecomment-1179452650

   > * sometimes it sees a double-offer, it it will decline it even if it's just a duplicate of the offer that it's just received.
   
   I noticed that this is _not_ how [RFC 2131](https://datatracker.ietf.org/doc/html/rfc2131) intends the client to behave. An `OFFER` is only supposed to be `DECLINED` "If the client detects that the address is already in use (e.g., through the use of ARP)" (and only at the `ACK` stage of processing. If multiple offers are received then the client indicates which server's offer it is accepting through the `server identifier` field.
   
   I also discovered that if any other udp packets arrive at the client while it's sleeping (e.g. from _other_ clients on the same network doing dhcp requests), then they will consume IO buffers, and never give them up, because `dhcpc_request` doesn't expect responses to be queued at the socket. This ends up starving all other network connections on the system. Changing the sleep into a recv & discard loop fixes this.


-- 
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