dotnet/runtime

System.Net.NetworkInformation.IPInterfaceProperties.DnsSuffix is not working as expected on Unix family OSes

Open

#1,475 建立於 2019年10月21日

在 GitHub 查看
 (5 留言) (12 反應) (2 負責人)C# (5,445 fork)batch import
area-System.Netenhancementhelp wantedin-pros-linuxos-mac-os-x

倉庫指標

Star
 (17,886 star)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

Currently, System.Net.NetworkInformation.IPInterfaceProperties.DnsSuffix property returns only the search keyword's value from resolv.conf when there is exactly one entry on the line where search is present.

According to resolv.conf manual, there could be multiple entries for a given search keyword.

Following the documentation, you can also see that the domain keyword could be used as the first search domain when specified.

Additionally, when both of the keywords are specified, the last one will be used as the search domain:

The domain and search keywords are mutually exclusive. If more than one instance of these keywords is present, the last instance wins.

Returning multiple search domain entries (DNS suffixes) would break the backward compatibility. However, there should be a way for Unix family OSes to acquire this data somehow and the domain keyword should be used as well.

貢獻者指南