3e68694bdf
Socket binded to INADDR_ANY is not intended to receive unicast traffic before being fully configured, at least dhclient configured with socket-only won't do so on Linux and BSDs (https://github.com/isc-projects/dhcp/blob/v4_4_3/common/socket.c#L1201). We can sometimes receive unicast traffic before being fully configured, it's good, but not always, so we need to set the broadcast flag under some situations. Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
config NETUTILS_DHCPC
|
|
bool "DHCP client"
|
|
default n
|
|
depends on NET_UDP
|
|
select NET_BINDTODEVICE if !NET_UDP_NO_STACK
|
|
---help---
|
|
Enable support for the DHCP client.
|
|
|
|
if NETUTILS_DHCPC
|
|
|
|
config NETUTILS_DHCPC_HOST_NAME
|
|
string "DHCP client host name"
|
|
default "nuttx"
|
|
|
|
config NETUTILS_DHCPC_RECV_TIMEOUT_MS
|
|
int "Number of receive timeout in millisecond"
|
|
default 3000
|
|
---help---
|
|
This is the timeout value when dhcp client receives response
|
|
|
|
config NETUTILS_DHCPC_RETRIES
|
|
int "Number of retries for dhcp client request"
|
|
default 3
|
|
---help---
|
|
This setting determines how many times resolver retries request
|
|
until failing.
|
|
|
|
config NETUTILS_DHCPC_BOOTP_FLAGS
|
|
hex "Flags of Bootstrap"
|
|
default 0x0000 if !NET_IPFORWARD
|
|
default 0x8000 if NET_IPFORWARD
|
|
---help---
|
|
This setting to set the BOOTP broadcast flags.
|
|
Reference RFC1542: Clarifications and Extensions for the
|
|
Bootstrap Protocol.
|
|
|
|
Note: We're not always able to receive unicast traffic before
|
|
being fully configured, e.g. with forward enabled. Then we need
|
|
to enable the broadcast flag under these situations.
|
|
|
|
endif
|