-
Notifications
You must be signed in to change notification settings - Fork 304
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
feat: use 127.0.0.1 as IPv4 if there's no external IPv4 addr #1353
Conversation
164bde0
to
fec24db
Compare
Since commit 0bc0d3b ("feat: add vsock network type support (dragonflyoss#1303)") we have vsock support, which means we could run dfget in a constrained VM env that only has loopback net interface, and connect to dfdaemon on host via vsock connection. So it's a valid setup to have no external IPv4 addr. Don't panic in this case and use "127.0.0.1" as IPv4. Signed-off-by: Eryu Guan <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1353 +/- ##
==========================================
- Coverage 45.67% 45.60% -0.07%
==========================================
Files 140 140
Lines 11978 11981 +3
==========================================
- Hits 5471 5464 -7
- Misses 5881 5898 +17
+ Partials 626 619 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* feat: use 127.0.0.1 as IPv4 if there's no external IPv4 addr Since commit 0bc0d3b ("feat: add vsock network type support (#1303)") we have vsock support, which means we could run dfget in a constrained VM env that only has loopback net interface, and connect to dfdaemon on host via vsock connection. So it's a valid setup to have no external IPv4 addr. Don't panic in this case and use "127.0.0.1" as IPv4. Signed-off-by: Eryu Guan <[email protected]> * Update ip_utils.go * Update ip_utils.go Co-authored-by: Gaius <[email protected]>
Since commit 0bc0d3b ("feat: add vsock network type support
(#1303)") we have vsock support, which means we could run dfget in a
constrained VM env that only has loopback net interface, and connect to
dfdaemon on host via vsock connection. So it's a valid setup to have no
external IPv4 addr.
Don't panic in this case and use "127.0.0.1" as IPv4.
Signed-off-by: Eryu Guan [email protected]
Description
Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist