[git commit] Make ping6 and traceroute6 selectable independently from ping/traceroute

Denys Vlasenko vda.linux at googlemail.com
Wed Nov 23 08:25:57 UTC 2016

commit: https://git.busybox.net/busybox/commit/?id=83423978014bce3ef4d09022d3eb1a4a32f7ba6d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
 networking/ping.c       | 12 +++++++-----
 networking/traceroute.c |  9 ++++++---
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/networking/ping.c b/networking/ping.c
index 82d5b7a..d0ef7ba 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -57,14 +57,14 @@
 //config:config PING6
 //config:	bool "ping6"
 //config:	default y
-//config:	depends on FEATURE_IPV6 && PING
+//config:	depends on FEATURE_IPV6
 //config:	help
 //config:	  This will give you a ping that can talk IPv6.
 //config:config FEATURE_FANCY_PING
 //config:	bool "Enable fancy ping output"
 //config:	default y
-//config:	depends on PING
+//config:	depends on PING || PING6
 //config:	help
 //config:	  Make the output from the ping applet include statistics, and at the
 //config:	  same time provide full support for ICMP packets.
@@ -907,15 +907,17 @@ static int common_ping_main(int opt, char **argv)
 #endif /* FEATURE_FANCY_PING */
 int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int ping_main(int argc UNUSED_PARAM, char **argv)
 	return common_ping_main(AF_UNSPEC, argv);
+# else
 	return common_ping_main(0, argv);
+# endif
 int ping6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 58a9b69..a463b0f 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -219,14 +219,14 @@
 //config:config TRACEROUTE6
 //config:	bool "traceroute6"
 //config:	default y
-//config:	depends on FEATURE_IPV6 && TRACEROUTE
+//config:	depends on FEATURE_IPV6
 //config:	help
 //config:	  Utility to trace the route of IPv6 packets.
 //config:	bool "Enable verbose output"
 //config:	default y
-//config:	depends on TRACEROUTE
+//config:	depends on TRACEROUTE || TRACEROUTE6
 //config:	help
 //config:	  Add some verbosity to traceroute. This includes among other things
 //config:	  hostnames and ICMP response types.
@@ -234,7 +234,7 @@
 //config:	bool "Enable -I option (use ICMP instead of UDP)"
 //config:	default y
-//config:	depends on TRACEROUTE
+//config:	depends on TRACEROUTE || TRACEROUTE6
 //config:	help
 //config:	  Add option -I to use ICMP ECHO instead of UDP datagrams.
@@ -243,6 +243,7 @@
 //kbuild:lib-$(CONFIG_TRACEROUTE) += traceroute.o
+//kbuild:lib-$(CONFIG_TRACEROUTE6) += traceroute.o
 //usage:#define traceroute_trivial_usage
 //usage:       "[-"IF_TRACEROUTE6("46")"FIlnrv] [-f 1ST_TTL] [-m MAXTTL] [-q PROBES] [-p PORT]\n"
@@ -1204,11 +1205,13 @@ common_traceroute_main(int op, char **argv)
 	return 0;
 int traceroute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int traceroute_main(int argc UNUSED_PARAM, char **argv)
 	return common_traceroute_main(0, argv);
 int traceroute6_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;

More information about the busybox-cvs mailing list