Slight cleanup, but no fix for code that came up in a bugreport.

This commit is contained in:
R.E. Wolff 2021-04-03 10:25:41 +02:00
parent 0b5312ec6e
commit 01ce4a5296
3 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,7 @@ minimal.
3. Make mtr-packet a setuid-root binary.
The mtr-packet binary can be made setuid-root, which is what "make install"
does by default.
does only if using setcap (above) fails. Using setcap is tried first.
When mtr-packet is installed as suid-root, some concern over security is
justified. mtr-packet does the following two things after it is launched:

2
TODO
View File

@ -23,6 +23,8 @@ Oh, Feel free to provide suggestions for this list.
----------------------------------------------------------------------
- cleanup
- cleanup warnings that the newer GCC produces.
- Stuff to implement:

View File

@ -207,11 +207,11 @@ static void reverse_host6(
{
int i;
char *b = buff;
for (i = (sizeof(*addr) / 2 - 1); i >= 0; i--, b += 4) /* 64b portion */
// We need to process the top 64 bits, or 8 bytes.
for (i = 8-1; i >= 0; i--, b += 4, buff_length -= 4)
snprintf(b, buff_length,
"%x.%x.", addr->s6_addr[i] & 0xf, addr->s6_addr[i] >> 4);
buff[strlen(buff) - 1] = '\0';
*--b = 0;
}
#endif