|
@@ -0,0 +1,61 @@
|
|
|
+--- traceroute-2.0.19.orig/traceroute/extension.c 2010-07-14 16:29:08.000000000 +0200
|
|
|
++++ traceroute-2.0.19/traceroute/extension.c 2013-12-29 20:01:35.000000000 +0100
|
|
|
+@@ -14,16 +14,16 @@ struct icmp_ext_header {
|
|
|
+ unsigned int reserved:4;
|
|
|
+ unsigned int version:4;
|
|
|
+ #endif
|
|
|
+- u_int8_t reserved1;
|
|
|
+- u_int16_t checksum;
|
|
|
++ uint8_t reserved1;
|
|
|
++ uint16_t checksum;
|
|
|
+ } __attribute__ ((packed));
|
|
|
+
|
|
|
+
|
|
|
+ struct icmp_ext_object {
|
|
|
+- u_int16_t length;
|
|
|
+- u_int8_t class;
|
|
|
+- u_int8_t c_type;
|
|
|
+- u_int8_t data[0];
|
|
|
++ uint16_t length;
|
|
|
++ uint8_t class;
|
|
|
++ uint8_t c_type;
|
|
|
++ uint8_t data[0];
|
|
|
+ };
|
|
|
+
|
|
|
+ #define MPLS_CLASS 1
|
|
|
+@@ -49,7 +49,7 @@ static int try_extension (probe *pb, cha
|
|
|
+ if (iext->version != 2) return -1;
|
|
|
+
|
|
|
+ if (iext->checksum &&
|
|
|
+- in_csum (iext, len) != (u_int16_t) ~0
|
|
|
++ in_csum (iext, len) != (uint16_t) ~0
|
|
|
+ ) return -1;
|
|
|
+
|
|
|
+ buf += sizeof (*iext);
|
|
|
+@@ -60,7 +60,7 @@ static int try_extension (probe *pb, cha
|
|
|
+ struct icmp_ext_object *obj = (struct icmp_ext_object *) buf;
|
|
|
+ size_t objlen = ntohs (obj->length);
|
|
|
+ size_t data_len;
|
|
|
+- u_int32_t *ui = (u_int32_t *) obj->data;
|
|
|
++ uint32_t *ui = (uint32_t *) obj->data;
|
|
|
+ int i, n;
|
|
|
+
|
|
|
+ if (objlen < sizeof (*obj) ||
|
|
|
+@@ -68,7 +68,7 @@ static int try_extension (probe *pb, cha
|
|
|
+ ) return -1;
|
|
|
+
|
|
|
+ data_len = objlen - sizeof (*obj);
|
|
|
+- if (data_len % sizeof (u_int32_t))
|
|
|
++ if (data_len % sizeof (uint32_t))
|
|
|
+ return -1; /* must be 32bit rounded... */
|
|
|
+
|
|
|
+ n = data_len / sizeof (*ui);
|
|
|
+@@ -85,7 +85,7 @@ static int try_extension (probe *pb, cha
|
|
|
+ do_snprintf (curr, end, "MPLS:");
|
|
|
+
|
|
|
+ for (i = 0; i < n; i++, ui++) {
|
|
|
+- u_int32_t mpls = ntohl (*ui);
|
|
|
++ uint32_t mpls = ntohl (*ui);
|
|
|
+
|
|
|
+ do_snprintf (curr, end, "%sL=%u,E=%u,S=%u,T=%u",
|
|
|
+ i ? "/" : "",
|