Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ping6 Remove the "-R" option. It uses IPV6...



details:   https://anonhg.NetBSD.org/src/rev/4d51ec578a55
branches:  trunk
changeset: 318440:4d51ec578a55
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Apr 23 18:44:39 2018 +0000
description:
Remove the "-R" option. It uses IPV6_REACHCONF, but we've never had
this.

diffstat:

 sbin/ping6/ping6.8 |  11 ++---------
 sbin/ping6/ping6.c |  41 ++++++-----------------------------------
 2 files changed, 8 insertions(+), 44 deletions(-)

diffs (129 lines):

diff -r 585b3e67490a -r 4d51ec578a55 sbin/ping6/ping6.8
--- a/sbin/ping6/ping6.8        Mon Apr 23 18:37:19 2018 +0000
+++ b/sbin/ping6/ping6.8        Mon Apr 23 18:44:39 2018 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: ping6.8,v 1.32 2018/04/23 07:25:36 wiz Exp $
+.\"    $NetBSD: ping6.8,v 1.33 2018/04/23 18:44:39 maxv Exp $
 .\"    $KAME: ping6.8,v 1.57 2002/05/26 13:18:25 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -37,7 +37,7 @@
 .Sh SYNOPSIS
 .Nm ping6
 .\" without IPsec, or new IPsec
-.Op Fl dfHmnNoqRtvwW
+.Op Fl dfHmnNoqtvwW
 .\" old IPsec
 .\" .Op Fl AdEfnNqRtvwW
 .Op Fl a Ar addrtype
@@ -207,13 +207,6 @@
 Quiet output.
 Nothing is displayed except the summary lines at startup time and
 when finished.
-.It Fl R
-Make the kernel believe that the target
-.Ar host
-is reachable, by injecting upper-layer reachability confirmation hint.
-The option is meaningful only if the target
-.Ar host
-is a neighbor.
 .It Fl S Ar sourceaddr
 Specifies the source address of request packets.
 The source address must be one of the unicast addresses of the sending node,
diff -r 585b3e67490a -r 4d51ec578a55 sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Mon Apr 23 18:37:19 2018 +0000
+++ b/sbin/ping6/ping6.c        Mon Apr 23 18:44:39 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ping6.c,v 1.99 2018/04/23 18:37:19 maxv Exp $  */
+/*     $NetBSD: ping6.c,v 1.100 2018/04/23 18:44:39 maxv Exp $ */
 /*     $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
 
 /*
@@ -77,7 +77,7 @@
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ping6.c,v 1.99 2018/04/23 18:37:19 maxv Exp $");
+__RCSID("$NetBSD: ping6.c,v 1.100 2018/04/23 18:44:39 maxv Exp $");
 #endif
 #endif
 
@@ -178,9 +178,6 @@
 #define F_FQDN         0x1000
 #define F_INTERFACE    0x2000
 #define F_SRCADDR      0x4000
-#ifdef IPV6_REACHCONF
-#define F_REACHCONF    0x8000
-#endif
 #define F_HOSTNAME     0x10000
 #define F_FQDNOLD      0x20000
 #define F_NIGROUP      0x40000
@@ -325,7 +322,7 @@
                err(EXIT_FAILURE, "init failed");
 
        while ((ch = getopt(argc, argv,
-           "a:b:c:dfHg:h:I:i:l:mnNop:qRS:s:tvwWx:X:" ADDOPTS)) != -1) {
+           "a:b:c:dfHg:h:I:i:l:mnNop:qS:s:tvwWx:X:" ADDOPTS)) != -1) {
 #undef ADDOPTS
                switch (ch) {
                case 'a':
@@ -484,13 +481,6 @@
                case 'q':
                        options |= F_QUIET;
                        break;
-               case 'R':
-#ifdef IPV6_REACHCONF
-                       options |= F_REACHCONF;
-                       break;
-#else
-                       errx(1, "-R is not supported in this configuration");
-#endif
                case 'S':
                        memset(&hints, 0, sizeof(struct addrinfo));
                        hints.ai_flags = AI_NUMERICHOST; /* allow hostname? */
@@ -778,11 +768,6 @@
        if (hoplimit != -1)
                ip6optlen += CMSG_SPACE(sizeof(int));
 
-#ifdef IPV6_REACHCONF
-       if (options & F_REACHCONF)
-               ip6optlen += CMSG_SPACE(0);
-#endif
-
        /* set IP6 packet options */
        if (ip6optlen) {
                if ((scmsg = (char *)malloc(ip6optlen)) == 0)
@@ -819,15 +804,6 @@
 
                scmsgp = CMSG_NXTHDR(&smsghdr, scmsgp);
        }
-#ifdef IPV6_REACHCONF
-       if (options & F_REACHCONF) {
-               scmsgp->cmsg_len = CMSG_LEN(0);
-               scmsgp->cmsg_level = IPPROTO_IPV6;
-               scmsgp->cmsg_type = IPV6_REACHCONF;
-
-               scmsgp = CMSG_NXTHDR(&smsghdr, scmsgp);
-       }
-#endif
 
        if (!(options & F_SRCADDR)) {
                /*
@@ -2546,14 +2522,9 @@
 usage(void)
 {
        (void)fprintf(stderr,
-           "usage: ping6 [-"
-           "dfHmNnq"
-#ifdef IPV6_REACHCONF
-           "R"
-#endif
-           "tvWw"
-           "] [-a addrtype] [-b bufsize] [-c count] [-g gateway]\n"
-            "\t[-h hoplimit] [-I interface] [-i wait] [-l preload]"
+           "usage: ping6 [-dfHmNnqtvWw] [-a addrtype] [-b bufsize]\n"
+           "\t[-c count] [-g gateway] [-h hoplimit] [-I interface]\n"
+           "\t[-i wait] [-l preload]"
 #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC)
            " [-P policy]"
 #endif



Home | Main Index | Thread Index | Old Index