aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/iputils/files/iputils-99999999-tracepath46.patch')
-rw-r--r--net-misc/iputils/files/iputils-99999999-tracepath46.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-misc/iputils/files/iputils-99999999-tracepath46.patch b/net-misc/iputils/files/iputils-99999999-tracepath46.patch
new file mode 100644
index 0000000..20d017b
--- /dev/null
+++ b/net-misc/iputils/files/iputils-99999999-tracepath46.patch
@@ -0,0 +1,30 @@
+From 2c4d0838dda90515d4971881d86e8b969baebe01 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Thu, 19 Oct 2017 17:38:20 +0200
+Subject: [PATCH] tracepath: Support calling `tracepath` as `tracepath4` or
+ `tracepath6`
+
+---
+ tracepath.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tracepath.c b/tracepath.c
+index b0eb911..d2a6edf 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -394,6 +394,12 @@ int main(int argc, char **argv)
+ setlocale(LC_ALL, "");
+ #endif
+
++ /* Support being called using `tracepath4` or `tracepath6` symlinks */
++ if (argv[0][strlen(argv[0])-1] == '4')
++ hints.ai_family = AF_INET;
++ else if (argv[0][strlen(argv[0])-1] == '6')
++ hints.ai_family = AF_INET6;
++
+ while ((ch = getopt(argc, argv, "46nbh?l:m:p:")) != EOF) {
+ switch(ch) {
+ case '4':
+--
+2.14.3
+