提交 def7a5c0 编写于 作者: M Marek Szyprowski 提交者: Tom Rini

net: ping: reset stored IP address

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: NMarek Szyprowski <m.szyprowski@samsung.com>
上级 a08f2f7b
......@@ -409,6 +409,10 @@ int net_loop(enum proto_t protocol)
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册