Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location names can be too long for linux clients #933

Open
adyxax opened this issue Jan 8, 2025 · 0 comments
Open

Location names can be too long for linux clients #933

adyxax opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@adyxax
Copy link

adyxax commented Jan 8, 2025

Describe the bug
When creating a new location in the defguard web interface, we provide a name that can be long.
The defguard client (at least on linux) normalises this location name (removes dash characters for example) and uses it to name the wireguard interface. There is a limit of 15 characters for this name that can make the wireguard interface creation fail.

I am unsure if this bug should be reported for defguard or defguard-client. I am reporting it on defguard because that is the component where location names are defined.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the defguard web interface and create a new location named for example 'aws-common-us-east-1'
  2. Grant access to this location to a user
  3. Open the linux defguard client and add the instance for this user
  4. Try to connect

Expected behavior
The connection should work.

Instead it fails. The system logs show:

2025-01-08T11:04:43.304130Z ERROR defguard_wireguard_rs::netlink: Failed to create WireGuard interface: Netlink payload error: Numerical result out of range (os error 34)
  at /srv/github/defguard/.cargo/git/checkouts/wireguard-rs-fba7499ea125cbe3/fbb88ee/src/netlink.rs:249
  in defguard_client::service::create_interface with interface_name: "awscommonuseast1"
  in defguard_client::service::defguard_service
2025-01-08T11:04:43.304157Z ERROR defguard_client::service: Failed to create WireGuard interface awscommonuseast1: Netlink error: Failed to create WireGuard interface
  at src/service/mod.rs:118
  in defguard_client::service::create_interface with interface_name: "awscommonuseast1"
  in defguard_client::service::defguard_service

The problem is that awscommonuseast1 is 16 characters long, while linux interfaces names cannot exceed 15 characters in length.

Version information

  • Defguard Core version: v1.1.4
  • Defguard Client version: v1.0.1
    • Debian 12
@adyxax adyxax added the bug Something isn't working label Jan 8, 2025
@teon teon moved this to Refined & Ready in Backlog & Roadmap Jan 8, 2025
@moubctez moubctez self-assigned this Jan 13, 2025
@moubctez moubctez moved this from Refined & Ready to In Progress in Backlog & Roadmap Jan 13, 2025
@t-aleksander t-aleksander moved this from In Progress to Testing in Backlog & Roadmap Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Testing
Development

No branches or pull requests

2 participants