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

Added default interface detection for Windows.. addresses issue #25 #56

Merged
merged 2 commits into from
Sep 20, 2020

Conversation

dogwynn
Copy link
Contributor

@dogwynn dogwynn commented Sep 17, 2020

Based on my understanding of ipconfig /all output, the default interface self-advertises by listing a valid IP address as Default Gateway. This PR integrates this into the the WindowsParser class.

@dogwynn
Copy link
Contributor Author

dogwynn commented Sep 17, 2020

Ok, some interfaces report a Default Gateway as :: or the IPv6 loopback Unspecified Address. Fixing.

Checking for `Default Gateway` that is `::` (IPv6 loopback) or in `127.0.0.0/8` (IPv4 loopback).
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2020

Codecov Report

Merging #56 into master will increase coverage by 0.34%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #56      +/-   ##
==========================================
+ Coverage   84.67%   85.01%   +0.34%     
==========================================
  Files           4        4              
  Lines         261      267       +6     
==========================================
+ Hits          221      227       +6     
  Misses         40       40              
Impacted Files Coverage Δ
src/ifcfg/parser.py 81.81% <100.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d936468...47e133c. Read the comment docs.

@dogwynn
Copy link
Contributor Author

dogwynn commented Sep 17, 2020

This addresses issue #25

@ftao ftao merged commit 21370c6 into ftao:master Sep 20, 2020
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.

3 participants