patch-traceroute_mod-dccp_c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- traceroute-2.0.19.orig/traceroute/mod-dccp.c 2012-11-19 16:51:53.000000000 +0100
  2. +++ traceroute-2.0.19/traceroute/mod-dccp.c 2013-12-29 20:01:35.000000000 +0100
  3. @@ -30,7 +30,7 @@ static unsigned int dest_port = 0;
  4. static int raw_sk = -1;
  5. static int last_ttl = 0;
  6. -static u_int8_t buf[1024]; /* enough, enough... */
  7. +static uint8_t buf[1024]; /* enough, enough... */
  8. static size_t csum_len = 0;
  9. static struct dccp_hdr *dh = NULL;
  10. static struct dccp_hdr_ext *dhe = NULL;
  11. @@ -51,8 +51,8 @@ static int dccp_init (const sockaddr_any
  12. int af = dest->sa.sa_family;
  13. sockaddr_any src;
  14. socklen_t len;
  15. - u_int8_t *ptr;
  16. - u_int16_t *lenp;
  17. + uint8_t *ptr;
  18. + uint16_t *lenp;
  19. dest_addr = *dest;
  20. @@ -117,10 +117,10 @@ static int dccp_init (const sockaddr_any
  21. ptr += len;
  22. }
  23. - lenp = (u_int16_t *) ptr;
  24. - ptr += sizeof (u_int16_t);
  25. - *((u_int16_t *) ptr) = htons ((u_int16_t) IPPROTO_DCCP);
  26. - ptr += sizeof (u_int16_t);
  27. + lenp = (uint16_t *) ptr;
  28. + ptr += sizeof (uint16_t);
  29. + *((uint16_t *) ptr) = htons ((uint16_t) IPPROTO_DCCP);
  30. + ptr += sizeof (uint16_t);
  31. /* Construct DCCP header */
  32. @@ -153,7 +153,7 @@ static int dccp_init (const sockaddr_any
  33. if (csum_len > sizeof (buf))
  34. error ("impossible"); /* paranoia */
  35. - len = ptr - (u_int8_t *) dh;
  36. + len = ptr - (uint8_t *) dh;
  37. if (len & 0x03) error ("impossible"); /* as >>2 ... */
  38. *lenp = htons (len);
  39. @@ -232,7 +232,7 @@ static probe *dccp_check_reply (int sk,
  40. char *buf, size_t len) {
  41. probe *pb;
  42. struct dccp_hdr *ndh = (struct dccp_hdr *) buf;
  43. - u_int16_t sport, dport;
  44. + uint16_t sport, dport;
  45. if (len < 8) return NULL; /* too short */