net: zperf: Set default IP addresses only if configured
If the user has not configured then we see the error prints for the defaults always. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
parent
6bd47ffb10
commit
dee1f2deaa
@ -1195,7 +1195,7 @@ void zperf_shell_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_IPV6) && MY_IP6ADDR) {
|
||||
if (IS_ENABLED(MY_IP4ADDR_SET) && MY_IP6ADDR) {
|
||||
ret = net_addr_pton(AF_INET6, MY_IP6ADDR,
|
||||
&in6_addr_my.sin6_addr);
|
||||
if (ret < 0) {
|
||||
@ -1218,7 +1218,7 @@ void zperf_shell_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_NET_IPV4) && MY_IP4ADDR) {
|
||||
if (IS_ENABLED(MY_IP4ADDR_SET) && MY_IP4ADDR) {
|
||||
ret = net_addr_pton(AF_INET, MY_IP4ADDR,
|
||||
&in4_addr_my.sin_addr);
|
||||
if (ret < 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user