bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] [PATCH] Failing traceroute on OpenBSD.


From: Mats Erik Andersson
Subject: Re: [bug-inetutils] [PATCH] Failing traceroute on OpenBSD.
Date: Thu, 4 Nov 2010 01:12:19 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

A regression is caused by the original patch in this thread.
Please check very carefully that I have managed to handle Git
correctly now, when mending this matter.

söndag den 31 oktober 2010 klockan 16:03 skrev Alfred M. Szmidt detta:
> Applied!
> 
> 2010-10-31  Mats Erik Andersson  <address@hidden>
> 
>       traceroute: Pass integer values to IP_TTL option.
> 
>       * src/traceroute.c (trace_init): Renamed TTLP to TTL, and changed
>       type to `int'.
>       (trace_inc_ttl): Likewise.

The problem is that the intermediary hosts are no longer
put on display. The original code used a pointer TTLP
and updated the target of that pointer. The changes
introduced in the previous patch did not observe this.

The optimal solution is simply to transform the old
element `ttl' in `struct trace' from

    unsigned char ttl

to 

    int ttl

and hence change later uses of

    const unsigned char *ttlp

to

    const int *ttlp

For better maintainability all three calls to setsockopt(3) now
use `sizeof (*ttlp)' instead of the semi-obscure `sizeof (t->ttl)'.


Regards,

Mats

Attachment: 0001-src-traceroute-Revert-and-correct-previous-change.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]