fix: properly parse ip addr show output for network interfaces#27
Merged
kennethdsheridan merged 1 commit intomainfrom Jan 27, 2026
Merged
fix: properly parse ip addr show output for network interfaces#27kennethdsheridan merged 1 commit intomainfrom
kennethdsheridan merged 1 commit intomainfrom
Conversation
The previous implementation was a stub that always returned eth0 with placeholder IP 192.168.1.100. This fix properly parses: - Interface names from 'X: ifname:' lines - MAC addresses from 'link/ether' lines - Handles Tailscale tunnel interfaces with 'link/none' - IPv4 addresses from 'inet' lines - Correctly classifies interface types (tailscale, wireless, bridge, etc) This enables proper detection of Tailscale VPN interfaces for NetBox network_access_ip field population.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the network interface parser that was returning placeholder data (
eth0with192.168.1.100) instead of actual interface information.Problem
The
parse_ip_output()function insrc/domain/parsers/network.rswas a stub implementation that always returned the same dummy data regardless of the actualip addr showoutput. This prevented proper detection of:Solution
Properly parse the
ip addr showoutput:X: ifname:lineslink/etherlineslink/noneinetlinesTesting
cargo checkpassesnetwork_access_ipfieldRelated
network_access_ipcustom field