Page MenuHomeFreeBSD

D21338.diff
No OneTemporary

D21338.diff

Index: sbin/ping6/ping6.8
===================================================================
--- sbin/ping6/ping6.8
+++ sbin/ping6/ping6.8
@@ -40,7 +40,7 @@
.Sh SYNOPSIS
.Nm
.\" without ipsec, or new ipsec
-.Op Fl DdfHmnNoqrRtvwW
+.Op Fl DdfmnNoqrRtvwW
.\" old ipsec
.\" .Op Fl ADdEfmnNqRtvwW
.Bk -words
@@ -177,11 +177,6 @@
.Ar gateway
as the next hop to the destination.
The gateway must be a neighbor of the sending node.
-.It Fl H
-Specifies to try reverse-lookup of IPv6 addresses.
-The
-.Nm
-utility does not try reverse-lookup unless the option is specified.
.It Fl h Ar hoplimit
Set the IPv6 hoplimit.
.It Fl I Ar interface
Index: sbin/ping6/ping6.c
===================================================================
--- sbin/ping6/ping6.c
+++ sbin/ping6/ping6.c
@@ -187,7 +187,7 @@
#define F_FQDN 0x1000
#define F_INTERFACE 0x2000
#define F_SRCADDR 0x4000
-#define F_HOSTNAME 0x10000
+#define F_NUMERIC 0x10000
#define F_FQDNOLD 0x20000
#define F_NIGROUP 0x40000
#define F_SUPTYPES 0x80000
@@ -351,7 +351,7 @@
#endif /*IPSEC_POLICY_IPSEC*/
#endif
while ((ch = getopt(argc, argv,
- "a:b:c:DdfHg:h:I:i:l:mnNop:qrRS:s:tvwWx:X:" ADDOPTS)) != -1) {
+ "a:b:c:Ddfg:h:I:i:l:mnNop:qrRS:s:tvwWx:X:" ADDOPTS)) != -1) {
#undef ADDOPTS
switch (ch) {
case 'a':
@@ -434,9 +434,6 @@
case 'g':
gateway = optarg;
break;
- case 'H':
- options |= F_HOSTNAME;
- break;
case 'h': /* hoplimit */
hoplimit = strtol(optarg, &e, 10);
if (*optarg == '\0' || *e != '\0')
@@ -490,7 +487,7 @@
/*NOTREACHED*/
#endif
case 'n':
- options &= ~F_HOSTNAME;
+ options |= F_NUMERIC;
break;
case 'N':
options |= F_NIGROUP;
@@ -2265,7 +2262,7 @@
* When doing reverse DNS lookups, the seenint flag might not
* be noticed for a while. Just exit if we get a second SIGINT.
*/
- if ((options & F_HOSTNAME) && seenint != 0)
+ if (!(options & F_NUMERIC) && seenint != 0)
_exit(nreceived ? 0 : 2);
}
@@ -2588,7 +2585,7 @@
static char buf[NI_MAXHOST];
int flag = 0;
- if ((options & F_HOSTNAME) == 0)
+ if ((options & F_NUMERIC) != 0)
flag |= NI_NUMERICHOST;
if (cap_getnameinfo(capdns, addr, addrlen, buf, sizeof(buf), NULL, 0,

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 11, 10:12 PM (14 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34975925
Default Alt Text
D21338.diff (2 KB)

Event Timeline