Skip to content

Conversation

hakansa
Copy link
Member

@hakansa hakansa commented Sep 8, 2025

[client] Add Windows DNS Policies To GPO Path Always

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)
    .

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 11:01
Copy link
Contributor

@Copilot 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 modifies the Windows DNS policy configuration to always apply both local and GPO (Group Policy Object) DNS policies, removing the conditional logic that previously only applied one or the other.

  • Removes conditional GPO path selection logic
  • Always configures both local DNS policies and GPO DNS policies
  • Simplifies the policy path determination by removing the index-based naming

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

if err := r.configureDNSPolicy(gpoDnsPolicyConfigMatchPath, domains, ip); err != nil {
return i, fmt.Errorf("configure local DNS policy: %w", err)
Copy link
Preview

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The error message 'configure local DNS policy' is misleading since this code is actually configuring the GPO DNS policy, not the local one. It should be 'configure GPO DNS policy' to accurately reflect what failed.

Suggested change
return i, fmt.Errorf("configure local DNS policy: %w", err)
return i, fmt.Errorf("configure GPO DNS policy: %w", err)

Copilot uses AI. Check for mistakes.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants