regression: fix --displaymode=2 argument

Input validation needs fixing as well.  Breaking commit tat made storage too
narrow effectively disabled validation.

Broken-since: b72d62b4ac
Partially-fixed-in: 69f5195a92
Reported-by: Narthorn <narthorn@gmail.com>
This commit is contained in:
Sami Kerola 2016-10-11 19:53:01 +01:00
parent 6898fc472b
commit 0d48a59156
No known key found for this signature in database
GPG Key ID: A9553245FDE9B739

2
mtr.h
View File

@ -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;
};