Reset the stored ping IP address before entering a netloop with different
protocol to ensure that it won't be interrupted by the received
correct ICMP_ECHO_REPLY packet.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
int ret = -EINVAL;
enum net_loop_state prev_net_state = net_state;
+#if defined(CONFIG_CMD_PING)
+ if (protocol != PING)
+ net_ping_ip.s_addr = 0;
+#endif
net_restarted = 0;
net_dev_exists = 0;
net_try_count = 1;