Skip to content

Conversation

@radu-solomon-dnsf
Copy link

There is bug in ARSoft on when the IPv6 detection happens. This fixes that to allow us to switch between networks with different protocols

Copilot AI review requested due to automatic review settings June 25, 2025 14:49
@radu-solomon-dnsf radu-solomon-dnsf merged commit a3dea6c into develop Jun 25, 2025
8 of 9 checks passed
@radu-solomon-dnsf radu-solomon-dnsf deleted the fix/ipv6-detection branch June 25, 2025 14:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR dynamically adjusts IPv6 detection and refactors code formatting, while also updating project packaging settings and CI workflows.

  • Switch IsIPv6Enabled to a getter that recomputes availability at runtime
  • Refactor DnsClientBase method signatures and formatting for consistency
  • Enhance .csproj with symbols, source-link, and bump BouncyCastle; update GitHub Actions to pack and publish

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Dns/DnsClientBase.cs Refactored method signatures, dynamic IPv6 check, formatting
ARSoft.Tools.Net.csproj Added symbol support, updated package refs
ARSoft.Tools.Net.sln.DotSettings Updated file header template for current year
ARSoft.Tools.Net.sln Added ARM64/x64 configurations
.github/workflows/custom-build.yml Changed build to pack and added publish step

List<DnsClientEndpointInfo> endpointInfos;
if (servers.Any(s => s.IsMulticast()))
{
var localIPs = NetworkInterface.GetAllNetworkInterfaces()
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The localIPs variable is computed but never used. If the intent was to bind transports per local address, integrate localIPs into endpoint creation; otherwise, remove this unused variable.

Copilot uses AI. Check for mistakes.
Comment on lines +466 to +472
private static bool IsIPv6Enabled
{
get => IsAnyIPv6Configured();
}

private static readonly IPAddress _ipvMappedNetworkAddress = IPAddress.Parse("0:0:0:0:0:FFFF::");

Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each access to IsIPv6Enabled invokes IsAnyIPv6Configured(), which enumerates all network interfaces. Consider caching this result or limiting calls to avoid repeated expensive scans.

Suggested change
private static bool IsIPv6Enabled
{
get => IsAnyIPv6Configured();
}
private static readonly IPAddress _ipvMappedNetworkAddress = IPAddress.Parse("0:0:0:0:0:FFFF::");
private static bool IsIPv6Enabled => _isIPv6Enabled;
private static readonly bool _isIPv6Enabled;
private static readonly IPAddress _ipvMappedNetworkAddress = IPAddress.Parse("0:0:0:0:0:FFFF::");
static DnsClientBase()
{
_isIPv6Enabled = IsAnyIPv6Configured();
}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant