From: Sami Kerola Date: Tue, 11 Oct 2016 18:53:01 +0000 (+0100) Subject: regression: fix --displaymode=2 argument X-Git-Tag: v0.88~21^2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d48a59156f3fc1e82d439baa9dc73c7424731cb;p=thirdparty%2Fmtr.git regression: fix --displaymode=2 argument 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 --- diff --git a/mtr.h b/mtr.h index 2487ad6..1058a5a 100644 --- 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; };