-
Notifications
You must be signed in to change notification settings - Fork 245
Auto-enable IPv6 by default, unless disabled #3720
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -96,7 +96,7 @@ int main ( int argc, char** argv ) | |||||
| bool bNoAutoJackConnect = false; | ||||||
| bool bUseTranslation = true; | ||||||
| bool bCustomPortNumberGiven = false; | ||||||
| bool bEnableIPv6 = false; | ||||||
| bool bDisableIPv6 = false; | ||||||
| int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS; | ||||||
| quint16 iPortNumber = DEFAULT_PORT_NUMBER; | ||||||
| int iJsonRpcPortNumber = INVALID_PORT; | ||||||
|
|
@@ -242,11 +242,11 @@ int main ( int argc, char** argv ) | |||||
| } | ||||||
|
|
||||||
| // Enable IPv6 --------------------------------------------------------- | ||||||
| if ( GetFlagArgument ( argv, i, "-6", "--enableipv6" ) ) | ||||||
| if ( GetFlagArgument ( argv, i, "--noipv6", "--noipv6" ) ) | ||||||
| { | ||||||
| bEnableIPv6 = true; | ||||||
| qInfo() << "- IPv6 enabled"; | ||||||
| CommandLineOptions << "--enableipv6"; | ||||||
| bDisableIPv6 = true; | ||||||
| qInfo() << "- IPv6 disabled"; | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like that this makes clear that disabling IPv6 is not recommended. Maybe add (this is not recommended)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably better in the documentation. It could get a bit wearing telling the user off every time when it's a conscious decision that has been made. |
||||||
| CommandLineOptions << "--noipv6"; | ||||||
| continue; | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -935,7 +935,8 @@ int main ( int argc, char** argv ) | |||||
| #ifndef SERVER_ONLY | ||||||
| if ( bIsClient ) | ||||||
| { | ||||||
| CClient Client ( iPortNumber, iQosNumber, strConnOnStartupAddress, bNoAutoJackConnect, strClientName, bEnableIPv6, bMuteMeInPersonalMix ); | ||||||
| CClient | ||||||
| Client ( iPortNumber, iQosNumber, strConnOnStartupAddress, bNoAutoJackConnect, strClientName, bDisableIPv6, bMuteMeInPersonalMix ); | ||||||
|
|
||||||
| // Create Settings with the client pointer | ||||||
| CClientSettings Settings ( &Client, strIniFileName ); | ||||||
|
|
@@ -960,14 +961,8 @@ int main ( int argc, char** argv ) | |||||
| } | ||||||
|
|
||||||
| // GUI object | ||||||
| CClientDlg ClientDlg ( &Client, | ||||||
| &Settings, | ||||||
| strConnOnStartupAddress, | ||||||
| bShowComplRegConnList, | ||||||
| bShowAnalyzerConsole, | ||||||
| bMuteStream, | ||||||
| bEnableIPv6, | ||||||
| nullptr ); | ||||||
| CClientDlg | ||||||
| ClientDlg ( &Client, &Settings, strConnOnStartupAddress, bShowComplRegConnList, bShowAnalyzerConsole, bMuteStream, nullptr ); | ||||||
|
|
||||||
| // show dialog | ||||||
| ClientDlg.show(); | ||||||
|
|
@@ -1007,7 +1002,7 @@ int main ( int argc, char** argv ) | |||||
| bUseMultithreading, | ||||||
| bDisableRecording, | ||||||
| bDelayPan, | ||||||
| bEnableIPv6, | ||||||
| bDisableIPv6, | ||||||
| eLicenceType ); | ||||||
|
|
||||||
| #ifndef NO_JSON_RPC | ||||||
|
|
@@ -1109,7 +1104,7 @@ QString UsageArguments ( char** argv ) | |||||
| " -Q, --qos set the QoS value. Default is 128. Disable with 0\n" | ||||||
| " (see the Jamulus website to enable QoS on Windows)\n" | ||||||
| " -t, --notranslation disable translation (use English language)\n" | ||||||
| " -6, --enableipv6 enable IPv6 addressing (IPv4 is always enabled)\n" | ||||||
| " --noipv6 disable IPv6 addressing (IPv4 is always enabled)\n" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems a bit verbose for a usage message, and probably better put in the documentation. Most people will probably not even be aware of IPv6, apart from the most technical. |
||||||
| "\n" | ||||||
| "Server only:\n" | ||||||
| " -d, --discononquit disconnect all Clients on quit\n" | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
Personal preference would be to have this flipped assuming IPv6 availability is there by default and we only set it to false in case we see it isn't. That would be more in line with the default enabled idea.
Uh oh!
There was an error while loading. Please reload this page.
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.
This boolean is internal only, not for user-facing presentation, and I feel this way round makes the logic cleaner. This is my reasoning:
I think to invert that logic would probably result in some unnecessary
elseclauses, and make the flow less tidy. I can't see a good reason to do so.