Skip to content

Timeout probes can have name/ip or not depending of the position in traceroute output #11

@rarylson

Description

@rarylson

Consider the following example:

traceroute to vialink.com.br (52.33.65.153), 64 hops max, 52 byte packets
 7  * * *

Here, we'll have three probes. Each one will have rtt = None and ip = None.

Now, in this example:

traceroute to vialink.com.br (52.33.65.153), 64 hops max, 52 byte packets
25  * * 52.93.14.61 (52.93.14.61)  218.370 ms

We will have three probes here. The first two will have rtt = None and ip = None. The last one will have rtt = 218.370 and ip = 52.93.14.61.

Lastly:

traceroute to vialink.com.br (52.33.65.153), 64 hops max, 52 byte packets
10  xe-0-0-0.96.jr03-napbr-db.durand.com.br (200.170.83.97)  20.741 ms  *  16.571 ms

We will also have three probes. The second one will have rtt = None (since it is a timeout) but it will have ip = '200.170.83.97'. This happens because the add_probe method always use the last probe info (name/ip) if the new one has no IP:

    def add_probe(self, probe):
        """Adds a Probe instance to this hop's results."""
        if self.probes:
            probe_last = self.probes[-1]
            if not probe.ip:
                probe.ip = probe_last.ip
                probe.name = probe_last.name
        self.probes.append(probe)

I think this behavior is inconsistent because the same probe can have or not IP depending on the position it is found. So I think a proper behavior is to always use ip = None and name = None in timeout probes. If we consider we never know the host (name/ip) which produced the timeout (can be another host different than the previous one), it makes sense to leave ip = None and name = None in timeout probes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions