-
Notifications
You must be signed in to change notification settings - Fork 72
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(net): add option -x to unshare network #130
Conversation
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.
The changes look good to me! Don't we need to also modify manpages and completions?
Oops I forgot about that, they have been pushed. |
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.
Looks good to me! Are the failing tests something to worry about?
Likely not! They’re failing due to #128 |
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! Nicely done @ericzty
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.
Looks great! Just a few small tweaks.
test/network.sh
Outdated
# Test if network works normally | ||
"$TRY" curl 1.1 || return 1 | ||
|
||
# Test if ping fails when network is unshared |
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.
What is curl 1.1
supposed to do? You say ping
but run curl
. Maybe use ping 8.8.8.8
?
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.
curl 1.1 expands to curl 1.0.0.1, which gets you the frontpage of cloudflare's public dns resolver, ping doesn't work due to #131
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! (Made two tiny text tweaks.)
This PR adds an option
-x
to unshare the network by adding--net
to the first unshare invocation.Note: I would use
ping -c1 1.1
instead ofcurl 1.1
but #131Closes #127