summaryrefslogtreecommitdiff
path: root/packages/iputils/files/tracepath6-mtu-opt.patch
blob: 63c8e76b3a5a10a4817da4d60a8114a3410923e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
This patch adds a manual option to set the MTU. The method to determine the
local MTU is failing on sh4/2.6.14. It's not yet clear if this is an sh4,
2.6.14 and glibc bug. The manual mtu option allows tracepath6 to still be
used on this platform.

--- new/tracepath6.c	2005/11/14 13:03:19	1.1
+++ new/tracepath6.c	2005/11/14 13:04:24
@@ -267,7 +267,7 @@
 
 static void usage(void)
 {
-	fprintf(stderr, "Usage: tracepath6 [-n] [-b] <destination>[/<port>]\n");
+	fprintf(stderr, "Usage: tracepath6 [-n] [-b] [-m <mtu>] <destination>[/<port>]\n");
 	exit(-1);
 }
 
@@ -282,7 +282,7 @@
 	struct hostent *he;
 	int ch;
 
-	while ((ch = getopt(argc, argv, "nbh?")) != EOF) {
+	while ((ch = getopt(argc, argv, "nbh?m:")) != EOF) {
 		switch(ch) {
 		case 'n':	
 			no_resolve = 1;
@@ -290,6 +290,9 @@
 		case 'b':	
 			show_both = 1;
 			break;
+		case 'm':
+			mtu = atol(optarg);
+			break;
 		default:
 			usage();
 		}