Bug 60794 - PingReply returns original destination address when ttl is reached rather than the address of the last hop.
Summary: PingReply returns original destination address when ttl is reached rather tha...
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 8.0 (15.4)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2017-11-22 01:41 UTC by Jon Goldberger [MSFT]
Modified: 2017-11-22 07:52 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test Project (30.63 KB, application/zip)
2017-11-22 01:41 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60794 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jon Goldberger [MSFT] 2017-11-22 01:41:12 UTC
Created attachment 25786 [details]
Test Project

## description

PingReply returns original destination address when Ttl is reached rather than the address of the last hop. This differs from .NET where the address of the last hop is in PingReply.Address. In Mono the original destination address is in PingReply.Address property. 

I already filed a bug against Mono: bug #60793 , but there is a slight difference between pure mono behavior and Android in that PingReply.Status in Android, when the ttl is exceeded, does have the correct TtlExpired Status whereas in Mono it has a Status of TimedOut, thus filing a separate bug for XA.


## Steps to reproduce

1. Open the attached test project.

2. Launch the Android app and tap the button.

Expected result: 5 lines should be output, each with the ping status, the Ttl, and the Address from the PingReply object. Where the Status should be TtlExpired on all lines, the Ttl should increase from 1 to 5, and the address should change but never be the original destination address, in this case it should never be 8.8.8.8 (unless you are within 5 hops to that IP address, which I doubt). 

Actual result: The Address is always the original ping destination address, in this case 8.8.8.8



## Environment

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.2.2 (build 11)
Installation UUID: f86726f2-bd5d-4610-867e-44e82f306ca2
Runtime:
	Mono 5.4.1.6 (2017-06/1f4613aa1ac) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 504010006

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	2.0.0
	1.1.1
	1.0.4
	1.0.0
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Versions:
	2.0.0
	1.0.1
	1.0.0-preview2-003121
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.6
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 9.1 (13532)
Build 9B55

=== Xamarin.iOS ===

Version: 11.3.0.47 (Visual Studio Enterprise)
Hash: 51128b8c
Branch: xcode9.1
Build date: 2017-10-31 22:42:13-0400

=== Xamarin.Android ===

Version: 8.0.2.1 (Visual Studio Enterprise)
Android SDK: /Users/jongoldberger/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)
		7.0   (API level 24)
		7.1   (API level 25)
		8.0   (API level 26)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 26.0.2
SDK Build Tools Version: 26.0.2

Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.8.1.0 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 702020011
Git revision: b604c37c5a4a2f0919b45ffbe2aaad9fe040af31
Build date: 2017-11-01 08:31:43-04
Xamarin addins: d57dc14cbd4eb166ee62bab585965ab78d3650bc
Build lane: monodevelop-lion-d15-4

=== Operating System ===

Mac OS X 10.13.1
Darwin 17.2.0 Darwin Kernel Version 17.2.0
    Fri Sep 29 18:27:05 PDT 2017
    root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

=== Enabled user installed addins ===

Internet of Things (IoT) development (Preview) 7.1