-
Notifications
You must be signed in to change notification settings - Fork 2k
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
native: unify and simplify usage of tapsetup script #3182
Conversation
Should work for Linux, Mac OS X, and FreeBSD. Please test. |
DEACTIVATE_IPV6="" | ||
|
||
usage() { | ||
echo "usage: $PROGRAM [OPTIONS]" >&2 |
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.
Please surround all variable names with curly braces, i.e. $PROGRAM
-> ${PROGRAM}
.
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.
Will do. Any particular reason why?
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.
Addressed
(this removes the script's dependency on |
echo " (default: tap; ignored on OSX and FreeBSD)" >&2 | ||
echo " -6, --deactivate-ipv6: deactivate IPv6 for the interfaces and bridge" >&2 | ||
echo " (ignored on OSX and FreeBSD)" >&2 | ||
echo " -h, --help: prints this text" >&2 |
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.
please make the help options left-aligned
Something fails on FreeBSD:
|
this PR:
master:
|
Can you explain to me, what this output means? |
adapted doc, addressed comments and (hopefully) fixed for OSX and FreeBSD. |
@LudwigOrtmann ping? |
@LudwigOrtmann won't be avaliable until July 4. |
When @authmillenon and me just talked about this PR, it came to my mind if it makes sense to move this script out of the |
👍 |
Can someone else test this script then on FreeBSD and OSX? |
case "${PLATFORM}" in | ||
FreeBSD) | ||
sudo kldload if_tap || exit 1;; | ||
sudo sysctl net.link.tap.user_open=1 |
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.
my zsh is complaining here. Please move the ;;
to the end of this case
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.
/bin/sh
is a symlink to zsh on your system?
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.
no it's not (: But still, this script refuses to work without these fixes
Addressed comments and fixed doc accordingly. |
99ad86a
to
f05efed
Compare
@thomaseichinger and @emmanuelsearch any luck testing this on OSX? @phiros any luck testing this on FreeBSD? |
I tested this on OS X, and it works as well as with #3290 (i.e. it sets up something, but ping6 timeouts 100% of the time in both directions). But I guess this PR was not focused on this issue. Basically: I think I can't test this more right now? |
Since I don't have access to a OSX machine a more technical test would be far more helpful. This means: use tests/dev_eth with txtsnd instead of ping and a clarification were the packet exactly gets lost. (Can you sniff the packets using wireshark or similar software? ) |
Or do you observe the same behavior with the old version of the script too. In that case, you are right: this is not the scope of this PR. |
Works on FreeBSD 10 |
Can somebody ACK then? |
AcK |
f05efed
to
664f51e
Compare
Rebased and squashed |
native: unify and simplify usage of tapsetup script
And finally merged. |
Started with the intention to make the deactivation of IPv6 optional, ended up overhauling the whole script(s).
From the self-docs: