Skip to content

fix(#420): remove service-type insertion from wireguard builder#421

Merged
cachebag merged 1 commit into
masterfrom
fix/wg
May 17, 2026
Merged

fix(#420): remove service-type insertion from wireguard builder#421
cachebag merged 1 commit into
masterfrom
fix/wg

Conversation

@cachebag
Copy link
Copy Markdown
Collaborator

WireGuardBuilder::build() inserted a service-type property into the wireguard settings section. WireGuard in NetworkManager is a native kernel connection type (connection.type = "wireguard"), not a plugin VPN. The wireguard section does not have a service-type property — only the vpn section for plugin VPNs (like OpenVPN) does. This caused NM to reject the profile with wireguard.service-type: unknown property.

Fixes #420

@cachebag cachebag requested a review from Copilot May 17, 2026 17:27
@cachebag cachebag self-assigned this May 17, 2026
@cachebag cachebag added bug Something isn't working nmrs Changes to nmrs vpn Changes to VPN surface wireguard WireGuard VPN protocol labels May 17, 2026
Copy link
Copy Markdown

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 fixes WireGuard connection creation so NetworkManager receives a native wireguard profile without the invalid wireguard.service-type property, matching the behavior described in issue #420.

Changes:

  • Removed insertion of service-type into the WireGuard settings section.
  • Updated the WireGuard builder test to assert that service-type is absent.

Reviewed changes

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

File Description
nmrs/src/api/builders/wireguard_builder.rs Stops adding the invalid service-type property to native WireGuard settings.
nmrs/src/api/builders/vpn.rs Updates the related unit test expectation for WireGuard settings.

WireGuardBuilder::build() inserted a service-type property into the wireguard settings section. WireGuard in NetworkManager is a native kernel connection type (connection.type = "wireguard"), not a plugin VPN. The wireguard section does not have a service-type property — only the vpn section for plugin VPNs (like OpenVPN) does. This caused NM to reject the profile with wireguard.service-type: unknown property.
@cachebag cachebag enabled auto-merge (rebase) May 17, 2026 17:30
@cachebag cachebag disabled auto-merge May 17, 2026 17:30
@cachebag cachebag merged commit 7ff0800 into master May 17, 2026
6 checks passed
@cachebag cachebag deleted the fix/wg branch May 17, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nmrs Changes to nmrs vpn Changes to VPN surface wireguard WireGuard VPN protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] connect_vpn sets invalid wireguard.service-type for kernel WireGuard connections

2 participants