]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
regression: fix --displaymode=2 argument
authorSami Kerola <kerolasa@iki.fi>
Tue, 11 Oct 2016 18:53:01 +0000 (19:53 +0100)
committerSami Kerola <kerolasa@iki.fi>
Tue, 11 Oct 2016 20:03:55 +0000 (21:03 +0100)
Input validation needs fixing as well.  Breaking commit tat made storage too
narrow effectively disabled validation.

Broken-since: b72d62b4ac2831bbe200b5f8ac8aa3403079c0d9
Partially-fixed-in: 69f5195a92593c6baeb6f51c108c31c0bbe1642a
Reported-by: Narthorn <narthorn@gmail.com>
mtr.h

diff --git a/mtr.h b/mtr.h
index 2487ad6e154a54a26368ac26bad737fe526333c9..1058a5a355fbf0e2a697dc3666bf944f842030b8 100644 (file)
--- a/mtr.h
+++ b/mtr.h
@@ -103,6 +103,7 @@ struct mtr_ctl {
   int localport;               /* source port for UDP tracing */
   int tcp_timeout;             /* timeout for TCP connections */
   unsigned char fld_active[2 * MAXFLD];        /* SO_MARK to set for ping packet*/
+  int display_mode;            /* display mode selector */
   int fld_index[FLD_INDEX_SZ]; /* default display field (defined by key in net.h) and order */
   char available_options[MAXFLD];
   int display_offset;          /* only used in text mode */
@@ -115,7 +116,6 @@ struct mtr_ctl {
     dns:1,
     reportwide:1,
     Interactive:1,
-    display_mode:2,
     DisplayMode:5;
 };