diff --git a/src/systemcmds/netman/Kconfig b/src/systemcmds/netman/Kconfig index d94b0ff82b..d2d1223397 100644 --- a/src/systemcmds/netman/Kconfig +++ b/src/systemcmds/netman/Kconfig @@ -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. diff --git a/src/systemcmds/netman/netman.cpp b/src/systemcmds/netman/netman.cpp index 0e74bcd586..1405aca4b1 100644 --- a/src/systemcmds/netman/netman.cpp +++ b/src/systemcmds/netman/netman.cpp @@ -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