diff --git a/src/IPAddressExtensions.cs b/src/IPAddressExtensions.cs index ca86348..73c016e 100644 --- a/src/IPAddressExtensions.cs +++ b/src/IPAddressExtensions.cs @@ -20,7 +20,7 @@ public static class IPAddressExtensions /// An IP Addresses. /// /// - /// The subnet mask; ror example "127.0.0.1" returns "255.0.0.0". + /// The subnet mask; for example "127.0.0.1" returns "255.0.0.0". /// Or null When does not belong to /// the localhost. /// s diff --git a/src/ServiceDiscovery.cs b/src/ServiceDiscovery.cs index a3c0cd5..0710bd9 100644 --- a/src/ServiceDiscovery.cs +++ b/src/ServiceDiscovery.cs @@ -266,10 +266,11 @@ void OnQuery(object sender, MessageEventArgs e) { response.Answers.AddRange(response.AdditionalRecords); } - // Only return address records that the querier can reach. - response.Answers.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); - response.AuthorityRecords.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); - response.AdditionalRecords.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); + + // Only return address records that the querier can reach. + response.Answers.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); + response.AuthorityRecords.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); + response.AdditionalRecords.RemoveAll(rr => IsUnreachable(rr, e.RemoteEndPoint)); if (QU) { diff --git a/test/IPAddressExtensionsTest.cs b/test/IPAddressExtensionsTest.cs index b44bec1..3c8b259 100644 --- a/test/IPAddressExtensionsTest.cs +++ b/test/IPAddressExtensionsTest.cs @@ -23,6 +23,7 @@ public void SubnetMask_Ipv4Loopback() } [TestMethod] + [TestCategory("IPv6")] public void SubnetMask_Ipv6Loopback() { var mask = IPAddress.IPv6Loopback.GetSubnetMask();