Allow interface names in IPv6 link-local addresses (dotnet/corefx#35278)
authorEgor Bogatov <egorbo@gmail.com>
Sat, 15 Jun 2019 21:44:42 +0000 (00:44 +0300)
committerDavid Shulman <david.shulman@microsoft.com>
Sat, 15 Jun 2019 21:44:41 +0000 (14:44 -0700)
commit1277f6c3342336b1f4c53516ee12627ac5096bd4
tree137b208c600ef37c2636ca150675443786da9c1b
parent5f98ba6a2bc13f1ddd7d839139383db3f30cd00d
Allow interface names in IPv6 link-local addresses (dotnet/corefx#35278)

* Handle interface names in ipv6 addresses (link-local)

* fix test projects

* Address feedback

* Add SetLastError to if_nametoindex

* fix tests

* fix tests

* Add more tests

* move native impl to pal_networking.c/h

* add newlines to pal_networking

* fix build

* remove "Vista" comment from Interop.if_nametoindex.cs

* test fix for Uri.cs

* undo changes

* Always return 0 for if_nametoindex on UAP

Commit migrated from https://github.com/dotnet/corefx/commit/fef0f817013ca7ebd39857b7aeecd369a9c36af5
12 files changed:
src/libraries/Common/src/Interop/Unix/System.Native/Interop.InterfaceNameToIndex.cs [new file with mode: 0644]
src/libraries/Common/src/Interop/Windows/IpHlpApi/Interop.if_nametoindex.cs [new file with mode: 0644]
src/libraries/Common/src/System/Net/IPv6AddressHelper.Common.cs
src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Unix.cs [new file with mode: 0644]
src/libraries/Common/src/System/Net/NetworkInformation/InterfaceInfoPal.Windows.cs [new file with mode: 0644]
src/libraries/Native/Unix/System.Native/pal_networking.c
src/libraries/Native/Unix/System.Native/pal_networking.h
src/libraries/System.Net.Primitives/src/System.Net.Primitives.csproj
src/libraries/System.Net.Primitives/src/System/Net/IPAddressParser.cs
src/libraries/System.Net.Primitives/tests/FunctionalTests/IPAddressParsing.cs
src/libraries/System.Net.Primitives/tests/PalTests/System.Net.Primitives.Pal.Tests.csproj
src/libraries/System.Net.Primitives/tests/UnitTests/System.Net.Primitives.UnitTests.Tests.csproj