question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packets that are returned when TTL expires are not recieved

See original GitHub issue

image

It seems nothing is recieved when we call RecvFrom: https://github.com/Killeroo/PowerPing/blob/615f78e441a9c5f523f68a34aac60b69e004b75b/src/PowerPing/Ping.cs#L301

I tried changing responseEP to be IPAddress.Any and tried remove the guards around the socket but at the socket level it doesn’t seem to be recieving the returned packet.

The returned packet seems to be in the correct format, could be a problem with the source address of the packet being different from what we expect (but I doudt this because Destination unreachable packets normally come from hosts that we don’t expect and they are normally recieved. Needs more investigation, also returned packet contains a copy of the original packet, might be interesting to see how that should be handled. Listen function doesn’t seem to see the returned packet either…

This fix is required to make traceroute work (https://github.com/Killeroo/PowerPing/issues/1).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Meister1977commented, Apr 16, 2020

You won’t believe it! If I add a new firewall rule to Windows to allow all ICMP packets (inbound) it works immediately.

Seems to me, ping.exe and traceroute.exe has own rules for inbound ICMP package. So we cab see it in Wireshark, but the firewall drop the answer if it would go to a not-well-known program which is on the exception list of the firewall.

0reactions
Killeroocommented, Apr 18, 2020

@Meister1977 Your solution does seem to work, annoyingly I can’t seem to restrict the rule to just PowerPing, it only works when ICMPv4 packets for any program is specified. I think this might have something to do the way the .NET programs are actually run, I actually tried to only allow different .NET dlls but that didn’t work either.

I am a bit torn about what to do, adding a blanket inbound rule to allow all ICMPv4 traffic through the firewall is possible and does work but it might be kind of rude to do this without user consent and limiting the inbound rule to just PowerPing doesn’t seem possible.

I will add these changes in a seperate branch and might implement a yes no option to ask users if they want to open firewall access when a user tries to use traceroute or ttl commands.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TTL Expired in Transit - Reason and Solution
TTL Expired in Transit is one of the common ping error messages you may receive in network troubleshooting. ... The packet will not...
Read more >
What does "TTL expired in transit" mean on a ping attempt?
"TTL expired in transit" is related to the TTL value of the packet; every router it passes through lowers it by one.
Read more >
What happens when TTL expires?
Rather, it returns an ICMP packet back to tell the source that the TTL expired. It's a reasonable way of stopping packets circulating...
Read more >
tcp - IP packet expired by TTL generate an ICMP response ...
For completeness: no ICMP TTL expired is returned for ICMP packets themselves. The only exception to that exception are ICMP echo request ...
Read more >
TTL expired but no packets lost
They just expire before reaching the destination. Command prompt received the proper acknowledgment in each hop till the packets expire.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found