|
1 This has been filed upstream at: |
|
2 |
|
3 https://github.com/traviscross/mtr/issues/76 |
|
4 |
|
5 and fixed in |
|
6 |
|
7 https://github.com/traviscross/mtr/commit/effef18b359c78a968de28cb1090866e974bd34f |
|
8 https://github.com/traviscross/mtr/commit/0b782f6a31d999694554b670009698499e2c98cc |
|
9 |
|
10 These changes should be available in mtr 0.87. |
|
11 |
|
12 --- mtr-0.86/configure.ac Tue Dec 9 03:20:57 2014 |
|
13 +++ mtr-0.86/configure.ac Tue Mar 24 15:03:00 2015 |
|
14 @@ -20,20 +20,11 @@ |
|
15 AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h cursesX.h sys/types.h fcntl.h) |
|
16 AC_CHECK_HEADERS(socket.h sys/socket.h sys/xti.h arpa/nameser_compat.h) |
|
17 |
|
18 -# We don't refer to any symbols in termcap, but -lcurses on SunOS does. |
|
19 -# We have to trust the linker not to mess things up... (It should not |
|
20 -# pull in anything if we don't refer to anything in the lib). |
|
21 -AC_CHECK_LIB(termcap, tgetent) |
|
22 -AC_CHECK_LIB(tinfo, tgetent) |
|
23 +AC_SEARCH_LIBS(initscr, [ncurses curses cursesX], , |
|
24 + AC_MSG_WARN(Building without curses display support) |
|
25 + AC_DEFINE(NO_CURSES, 1, [Define if you don't have the curses libraries available.]) |
|
26 + CURSES_OBJ=) |
|
27 |
|
28 -AC_CHECK_FUNC(initscr, , |
|
29 - AC_CHECK_LIB(ncurses, initscr, , |
|
30 - AC_CHECK_LIB(curses, initscr, , |
|
31 - AC_CHECK_LIB(cursesX, initscr, , |
|
32 - AC_MSG_WARN(Building without curses display support) |
|
33 - AC_DEFINE(NO_CURSES, 1, Define if you don't have the curses libraries available.) |
|
34 - CURSES_OBJ=)))) |
|
35 - |
|
36 AC_CHECK_FUNCS(attron fcntl) |
|
37 |
|
38 AC_CHECK_LIB(m, floor, , AC_MSG_ERROR(No math library found)) |
|
39 --- mtr-0.86/mtr.c Tue Dec 9 03:20:57 2014 |
|
40 +++ mtr-0.86/mtr.c Fri Mar 20 09:43:55 2015 |
|
41 @@ -89,7 +89,7 @@ |
|
42 int maxTTL = 30; /* inline with traceroute */ |
|
43 /* end ttl window stuff. */ |
|
44 int remoteport = 80; /* for TCP tracing */ |
|
45 -int timeout = 10 * 1000000; /* for TCP tracing */ |
|
46 +int tcp_timeout = 10 * 1000000; /* for TCP tracing */ |
|
47 |
|
48 |
|
49 /* default display field(defined by key in net.h) and order */ |
|
50 @@ -454,8 +454,8 @@ |
|
51 } |
|
52 break; |
|
53 case 'Z': |
|
54 - timeout = atoi(optarg); |
|
55 - timeout *= 1000000; |
|
56 + tcp_timeout = atoi(optarg); |
|
57 + tcp_timeout *= 1000000; |
|
58 break; |
|
59 case '4': |
|
60 af = AF_INET; |
|
61 --- mtr-0.86/net.c Fri Mar 20 09:43:55 2015 |
|
62 +++ mtr-0.86/net.c Fri Mar 20 09:43:55 2015 |
|
63 @@ -209,7 +209,7 @@ |
|
64 extern int af; /* address family of remote target */ |
|
65 extern int mtrtype; /* type of query packet used */ |
|
66 extern int remoteport; /* target port for TCP tracing */ |
|
67 -extern int timeout; /* timeout for TCP connections */ |
|
68 +extern int tcp_timeout; /* timeout for TCP connections */ |
|
69 #ifdef SO_MARK |
|
70 extern int mark; /* SO_MARK to set for ping packet*/ |
|
71 #endif |
|
72 @@ -1559,7 +1559,7 @@ |
|
73 } |
|
74 if (fd > 0) { |
|
75 utime = sequence[at].time.tv_sec * 1000000L + sequence[at].time.tv_usec; |
|
76 - if (unow - utime > timeout) { |
|
77 + if (unow - utime > tcp_timeout) { |
|
78 close(fd); |
|
79 sequence[at].socket = 0; |
|
80 } |