XinStellaris commented on code in PR #1307: URL: https://github.com/apache/incubator-nuttx-apps/pull/1307#discussion_r963006957
########## netutils/dhcpc/dhcpc.c: ########## @@ -665,6 +666,17 @@ int dhcpc_request(FAR void *handle, FAR struct dhcpc_state *presult) int retries; int state; + /* RFC2131: A DHCP client MUST choose 'xid's in such a + * way as to minimize the chance of using an 'xid' identical to one used + * by another client. + */ + + ret = getrandom(&xid, sizeof(xid), 0); Review Comment: I think we should put it in dhcp request, so that if we keep the dhcpc thread, xid will change every time just like the rfc requested. -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org