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

detectPublicIPv4: try to detect ipv4's from interfaces with a default gateway first #493

Merged

Conversation

rpardini
Copy link
Contributor

@rpardini rpardini commented Aug 5, 2024

detectPublicIPv4: try to detect ipv4's from interfaces with a default gateway first

  • adds github.com/vishvananda/netlink to get at the routing tables
  • if none found, old logic is kept (gets the first IPv4 from the first interface that has one)

Signed-off-by: Ricardo Pardini ricardo@pardini.net

@rpardini rpardini force-pushed the autodetect-ip4v-with-default-gateway branch from 269c9d8 to f4e2a80 Compare August 17, 2024 08:05
… gateway first

- adds github.com/vishvananda/netlink to get at the routing tables
- if none found, old logic is kept (gets the first IPv4 from the first interface that has one)

Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
@rpardini rpardini force-pushed the autodetect-ip4v-with-default-gateway branch from f4e2a80 to c746cb9 Compare August 17, 2024 08:26
@rpardini
Copy link
Contributor Author

Yay got it green, finally. Sorry for the delay...

Copy link

codecov bot commented Aug 17, 2024

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 52%. Comparing base (160defe) to head (c746cb9).
Report is 2 commits behind head on main.

Files Patch % Lines
cmd/smee/flag.go 65% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@         Coverage Diff         @@
##           main   #493   +/-   ##
===================================
- Coverage    52%    52%   -1%     
===================================
  Files        26     26           
  Lines      2116   2136   +20     
===================================
+ Hits       1121   1124    +3     
- Misses      963    980   +17     
  Partials     32     32           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Aug 27, 2024
@mergify mergify bot merged commit db21d79 into tinkerbell:main Aug 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants