From 3dc5a26847c9857c72b6fed2547425fed71d8b37 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Sat, 25 May 2019 10:05:03 +1200 Subject: [PATCH] chore: CI does not do IPv6 --- src/IPAddressExtensions.cs | 2 +- src/ServiceDiscovery.cs | 9 +++++---- test/IPAddressExtensionsTest.cs | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) 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();