diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2000-03-05 09:38:56 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2000-03-05 09:38:56 +0000 |
commit | 95ab1a6bbaf203f931376a8cf5a790fe51a24196 (patch) | |
tree | 6e9b1302089ac05921b380b3d7fb3c59671eed4e /net/nsping/files/patch-ab | |
parent | From OpenBSD: generate tempfiles securely with mkstemps() (diff) |
nsping 0.8 is a tool for 'pinging' DNS servers.
Obtained from: OpenBSD
Notes
Notes:
svn path=/head/; revision=26557
Diffstat (limited to 'net/nsping/files/patch-ab')
-rw-r--r-- | net/nsping/files/patch-ab | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net/nsping/files/patch-ab b/net/nsping/files/patch-ab new file mode 100644 index 000000000000..970acc7d39cc --- /dev/null +++ b/net/nsping/files/patch-ab @@ -0,0 +1,28 @@ +--- nsping.c.orig Fri Nov 12 15:30:42 1999 ++++ nsping.c Fri Nov 12 15:44:06 1999 +@@ -189,10 +189,14 @@ + + int guess_zone() { + char lhn[MAXDNAME]; ++ struct hostent *hp; + char *cp; + + if(gethostname(lhn, MAXDNAME) < 0) + return(0); ++ if((hp = gethostbyname(lhn)) == NULL) ++ return(0); ++ strlcpy(lhn, hp->h_name, sizeof(lhn)); + + cp = strchr(lhn, '.'); + if(!cp || !(*(++cp))) +@@ -679,9 +683,7 @@ + /* -------------------------------------------------------------------------- */ + + void usage() { +- fprintf(stderr, "nsping [ -z <zone> | -h <hostname> ] -p <port> -t <timeout>\n" +- "\t\t-a <local address> -P <local port>\n" +- "\t\t-T <type> <-r | -R, recurse?>\n"); ++ fprintf(stderr, "Usage: nsping [-dR] [-c count] [-z zone | -h hostname] [-t timeout] [-p dport] [-P sport] [-a saddr] [-T querytype]\n"); + return; + } + |