Dolda2000 GitWeb
/
icmp-dn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a segvbug.
[icmp-dn.git]
/
idnlookup.c
diff --git
a/idnlookup.c
b/idnlookup.c
index
be4809b
..
2c49f87
100644
(file)
--- a/
idnlookup.c
+++ b/
idnlookup.c
@@
-164,7
+164,6
@@
int main(int argc, char **argv)
}
memset(&aihint, 0, sizeof(aihint));
}
memset(&aihint, 0, sizeof(aihint));
- aihint.ai_family = PF_INET; /* Only IPv4 for now. */
aihint.ai_socktype = SOCK_RAW;
aihint.ai_protocol = IPPROTO_ICMP;
ret = getaddrinfo(argv[optind], NULL, &aihint, &ai);
aihint.ai_socktype = SOCK_RAW;
aihint.ai_protocol = IPPROTO_ICMP;
ret = getaddrinfo(argv[optind], NULL, &aihint, &ai);
@@
-196,7
+195,7
@@
int main(int argc, char **argv)
pfd.events = POLLIN;
gettimeofday(&tvc, NULL);
elapsed = ((tvc.tv_sec - tvb.tv_sec) * 1000) + ((tvc.tv_usec - tvb.tv_usec) / 1000);
pfd.events = POLLIN;
gettimeofday(&tvc, NULL);
elapsed = ((tvc.tv_sec - tvb.tv_sec) * 1000) + ((tvc.tv_usec - tvb.tv_usec) / 1000);
- if(elapsed > timeout) {
+ if(elapsed >
=
timeout) {
fprintf(stderr, "idnlookup: timeout\n");
exit(1);
}
fprintf(stderr, "idnlookup: timeout\n");
exit(1);
}