mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system/ping: Fix a segmentation fault when using ping
nsh> ping google.com
[ 37.180000] dns_query_error: ERROR: IPv4 dns_recv_response fa: -84,
server address: 8.8.8.8
Segmentation fault.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
parent
0566af556a
commit
707b24e5cb
2 changed files with 4 additions and 0 deletions
|
|
@ -345,6 +345,8 @@ int main(int argc, FAR char *argv[])
|
|||
int exitcode;
|
||||
int option;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
||||
info.count = ICMP_NPINGS;
|
||||
info.datalen = ICMP_PING_DATALEN;
|
||||
info.delay = ICMP_POLL_DELAY;
|
||||
|
|
|
|||
|
|
@ -286,6 +286,8 @@ int main(int argc, FAR char *argv[])
|
|||
int exitcode;
|
||||
int option;
|
||||
|
||||
memset(&info, 0, sizeof(info));
|
||||
|
||||
info.count = ICMPv6_NPINGS;
|
||||
info.datalen = ICMPv6_PING6_DATALEN;
|
||||
info.delay = ICMPv6_POLL_DELAY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue