netman: Allow default fallback IP to be set by board config

This commit is contained in:
Anthony Merlino 2024-01-10 22:12:09 +00:00 committed by Daniel Agar
parent e1ad1b60d0
commit 5c845a58f1
2 changed files with 10 additions and 2 deletions

View File

@ -10,3 +10,11 @@ menuconfig USER_NETMAN
depends on BOARD_PROTECTED && SYSTEMCMDS_NETMAN
---help---
Put netman in userspace memory
config NETMAN_FALLBACK_IPADDR
hex "Fallback IPv4 address"
default 0XC0A80003
depends on SYSTEMCMDS_NETMAN
---help---
If NETINIT_DHCPC is set, getting an IP from DHCP server is first attempted.
If this fails, this IP address is used as a static fallback.

View File

@ -53,8 +53,8 @@
constexpr char DEFAULT_NETMAN_CONFIG[] = "/fs/microsd/net.cfg";
#if defined(CONFIG_NETINIT_DHCPC)
# define DEFAULT_PROTO IPv4PROTO_FALLBACK
# define DEFAULT_IP 0XC0A80003 // 192.168.0.3
# define DEFAULT_PROTO IPv4PROTO_FALLBACK
# define DEFAULT_IP CONFIG_NETMAN_FALLBACK_IPADDR
#else
# define DEFAULT_PROTO IPv4PROTO_STATIC
# define DEFAULT_IP CONFIG_NETINIT_IPADDR