RT-Thread-packages / wiznet

WIZnet TCP/IP chips (such as W5500/W5100..) SAL framework implement.
Apache License 2.0
49 stars 35 forks source link

修复在 ping 域名失败之后再 ping ip地址的时候会出现失败的问题。 #24

Closed zhouchuanfu closed 5 years ago

zhouchuanfu commented 5 years ago

修复在 ping 域名失败之后再 ping ip地址的时候会出现失败的问题。 会出现 "wiz_ping: create ping socket(%d) failed.” 失败提示。

Lawlieta commented 5 years ago

这边测试并没有成功复现所述问题,多次 ping 域名失败之后 wiz_ping 功能也能正常运行。

因为这是 wiznet 官方库中可能存在的问题,建议先向上游官方库提交 PR ,地址如下:

https://github.com/Wiznet/ioLibrary_Driver/blob/master/Internet/DNS/dns.c#L537-L543

zhouchuanfu commented 5 years ago

确保是在dns服务器没有回应的时候,打印“DNS Server is not responding”信息的情况。 已经将代码提交到上游官方库。

armink commented 5 years ago

waiting for https://github.com/Wiznet/ioLibrary_Driver/pull/79

joon874 commented 5 years ago

'ret_check_timeout < 0' is not yet timeout. So, dns socket is still opened. Did you have ping fail when you tried ping to wiz_chip during DNS failed?

zhouchuanfu commented 5 years ago

是的,我的测试环境是网口的路由将网口的上网权限关闭了,然后ping域名失败之后,再次ping域名,就无法建立DNS连接,提示上面的错误。