lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120519140821.GA5400@amd64.fatal.se>
Date:	Sat, 19 May 2012 16:08:21 +0200
From:	Andreas Henriksson <andreas@...al.se>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Robert Henney <robh@....org>, 673355@...s.debian.org,
	netdev@...r.kernel.org
Subject: [PATCH] iproute2: man page and /bin/ip disagree on del vs delete

On Thu, May 17, 2012 at 09:29:28PM -0400, Robert Henney wrote:
> the 'ip' man page does not mention the command "del" at all but does
> claim, "As a rule, it is possible to add, delete and show (or list ) objects".  
> however, 'ip' does not always recognize "delete" as a commend.
> 
> robh@...ian:~$ ip tunnel delete
> Command "delete" is unknown, try "ip tunnel help".

Lets use "delete" in all calls to matches() for consistency. This will
make both "del" and "delete" work everywhere.

Signed-off-by: Andreas Henriksson <andreas@...al.se>

diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
index d5bee36..c9720eb 100644
--- a/ip/ip6tunnel.c
+++ b/ip/ip6tunnel.c
@@ -408,7 +408,7 @@ int do_ip6tunnel(int argc, char **argv)
 			return do_add(SIOCADDTUNNEL, argc - 1, argv + 1);
 		if (matches(*argv, "change") == 0)
 			return do_add(SIOCCHGTUNNEL, argc - 1, argv + 1);
-		if (matches(*argv, "del") == 0)
+		if (matches(*argv, "delete") == 0)
 			return do_del(argc - 1, argv + 1);
 		if (matches(*argv, "show") == 0 ||
 		    matches(*argv, "lst") == 0 ||
diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c
index c5683f5..3a5f94b 100644
--- a/ip/ipl2tp.c
+++ b/ip/ipl2tp.c
@@ -795,7 +795,7 @@ int do_ipl2tp(int argc, char **argv)
 
 	if (matches(*argv, "add") == 0)
 		return do_add(argc-1, argv+1);
-	if (matches(*argv, "del") == 0)
+	if (matches(*argv, "delete") == 0)
 		return do_del(argc-1, argv+1);
 	if (matches(*argv, "show") == 0 ||
 	    matches(*argv, "lst") == 0 ||
diff --git a/ip/iptunnel.c b/ip/iptunnel.c
index 3d41a27..38ccd87 100644
--- a/ip/iptunnel.c
+++ b/ip/iptunnel.c
@@ -620,7 +620,7 @@ int do_iptunnel(int argc, char **argv)
 			return do_add(SIOCADDTUNNEL, argc-1, argv+1);
 		if (matches(*argv, "change") == 0)
 			return do_add(SIOCCHGTUNNEL, argc-1, argv+1);
-		if (matches(*argv, "del") == 0)
+		if (matches(*argv, "delete") == 0)
 			return do_del(argc-1, argv+1);
 		if (matches(*argv, "show") == 0 ||
 		    matches(*argv, "lst") == 0 ||
diff --git a/ip/iptuntap.c b/ip/iptuntap.c
index 29f2777..20914e1 100644
--- a/ip/iptuntap.c
+++ b/ip/iptuntap.c
@@ -307,7 +307,7 @@ int do_iptuntap(int argc, char **argv)
 	if (argc > 0) {
 		if (matches(*argv, "add") == 0)
 			return do_add(argc-1, argv+1);
-		if (matches(*argv, "del") == 0)
+		if (matches(*argv, "delete") == 0)
 			return do_del(argc-1, argv+1);
 		if (matches(*argv, "show") == 0 ||
                     matches(*argv, "lst") == 0 ||
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ