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

fix(dgw): improve network interface information extraction #1290

Closed
wants to merge 12 commits into from

Conversation

irvingoujAtDevolution
Copy link
Contributor

@irvingoujAtDevolution irvingoujAtDevolution commented Mar 31, 2025

Improved api/net/config end point, correctly return ip and routes for both windows and linux. Renamed struct field to better match it's semantices.

Example output

From api request

id          : {B4488786-D294-448F-8D0A-D2573F2126C7}
description : Hyper-V Virtual Ethernet Adapter #3
mac_address : 00:15:5D:34:6E:07
routes      : {@{ip=10.10.0.0; prefixlen=24}, @{ip=10.10.0.1; prefixlen=32}, @{ip=10.10.0.255; 
              prefixlen=32}, @{ip=224.0.0.0; prefixlen=4}…}
is_up       : True
gateways    : {}
nameservers : {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
name        : vEthernet (LAN Switch)
ip_adresses : {10.10.0.1}

from ipconfig

Ethernet adapter vEthernet (LAN Switch):

   Connection-specific DNS Suffix  . : 
   Link-local IPv6 Address . . . . . : fe80::f5f9:2d83:9342:2005%23
   IPv4 Address. . . . . . . . . . . : 10.10.0.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 

Copy link

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@irvingoujAtDevolution irvingoujAtDevolution changed the title ipconfig improvement improvement: network interface information extration Mar 31, 2025
Comment on lines +91 to +92
// Linux interfaces does not come with an id
pub id: Option<String>,
Copy link
Member

@CBenoit CBenoit Mar 31, 2025

Choose a reason for hiding this comment

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

question: Should it be named adapter_id or adapter_name instead? Or is this naming used somewhere else? I think Paul linked a reference somewhere.

Copy link
Contributor Author

@irvingoujAtDevolution irvingoujAtDevolution Apr 1, 2025

Choose a reason for hiding this comment

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

I think id is fine, the struct named as Adapter

@CBenoit
Copy link
Member

CBenoit commented Apr 1, 2025

@irvingoujAtDevolution CI is red for Linux, can you check that?

EDIT: Looks like it’s a problem with aws-lc again. Probably unrelated to your code.

@CBenoit
Copy link
Member

CBenoit commented Apr 2, 2025

@irvingoujAtDevolution I think you can rebase on master. The problem appears to be fixed.

@CBenoit CBenoit changed the title improvement: network interface information extration fix(dgw): improve network interface information extraction Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants