commit-inetutils
[Top][All Lists]
Advanced

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

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-313-gf8d2f


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-313-gf8d2f1e
Date: Thu, 04 Jul 2013 15:05:17 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  f8d2f1e566c07f985948990d67d867b723cb133f (commit)
      from  625b1fa2254eee5962db1e3ff76f999d556a6d8d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=f8d2f1e566c07f985948990d67d867b723cb133f


commit f8d2f1e566c07f985948990d67d867b723cb133f
Author: Mats Erik Andersson <address@hidden>
Date:   Thu Jul 4 14:58:44 2013 +0200

    traceroute: Gateway selection.

diff --git a/ChangeLog b/ChangeLog
index 381c0b0..02ec2df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-04  Mats Erik Andersson  <address@hidden>
+
+       traceroute: Gateway selection.
+       Make `-g' additive in repeated use to better
+       conform with other implementations.
+
+       * src/traceroute.c (parse_opt) [IP_OPTIONS] <'g'>:
+       Append `arg' to `opt_gateways' if the latter has
+       already been assigned a value.
+
 2013-06-28  Mats Erik Andersson  <address@hidden>
 
        traceroute: Portability of PID range.
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 0d2de39..7e9010e 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -1060,6 +1060,7 @@ using spaces, commata, or semicola as separators.
 These hosts must be traversed in the given order
 before the intended host receives any datagram.
 At most eight host names or addresses may be specified.
+Multiple uses of @option{-g} produce a concatenated list.
 
 @item -I
 @itemx --icmp
diff --git a/src/traceroute.c b/src/traceroute.c
index a16b0d5..e42b7c0 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -179,7 +179,22 @@ parse_opt (int key, char *arg, struct argp_state *state)
 
 #ifdef IP_OPTIONS
     case 'g':
-      opt_gateways = xstrdup (arg);
+      if (opt_gateways)
+       {
+         size_t len = 0;
+
+         len = strlen (opt_gateways);
+         opt_gateways = xrealloc (opt_gateways, len + strlen (arg) + 3);
+
+         /* Append new gateways to old list,
+          * separating the two parts by a comma.
+          */
+         opt_gateways[len] = ',';
+         opt_gateways[len + 1] = '\0';
+         strcat (opt_gateways, arg);
+       }
+      else
+       opt_gateways = xstrdup (arg);
       break;
 #endif /* IP_OPTIONS */
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |   10 ++++++++++
 doc/inetutils.texi |    1 +
 src/traceroute.c   |   17 ++++++++++++++++-
 3 files changed, 27 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]