-
Notifications
You must be signed in to change notification settings - Fork 363
Fix handling of legacy status
value
#732
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
758f5d7
to
47d17cf
Compare
This doesn't add any new command-line arguments, but it does mean that a new command-line argument can be added for any variable, not just those in `$variables{'global-defaults'}`, and its value will be copied to `%globals`. My main motivation for this commit is to make it possible to remove the redundant variable declarations between `$variables{'global-defaults'}` and `$variables{'protocol-common-defaults'}`.
The code already treats `undef` and 0 the same, and `undef` omits them from the recap which simplifies testing.
This is mostly to simplify tests, but it also improves readability. The infrastructure changes in this commit also make it possible to introduce a new `url` variable that defaults to `opt('server', $h)` concatenated with `opt('script', $h)` so that we can start migrating away from those user-unfriendly variables.
Now that the default changes depending on `usev4` and `usev6`, this is no longer necessary. Removing it simplifies the code a bit and makes the behavior of unit tests match the overall behavior a bit better.
* Delete values from `$config{$h}` and `$recap{$h}` when resetting values (as opposed to setting a falsy value). * Delete values from `$config{$h}` and `$recap{$h}` when they are no longer needed. This is mostly done to improve the tests in `t/update_nics.pl`.
Rather than check whether `use`, `usev4`, or `usev6` is a non-disabled value, check that `wantip`, `wantipv4`, or `wantipv6` is a defined value. This is preparation for removing the `status` variable in a future commit.
When a legacy protocol implementation returns, move its `status` and `ip` results to the new `status-ipv4` and `ipv4` (or `status-ipv6` and `ipv6`) properties. Also remove the now-unused `status` variable definition, and remove `ip` from the recap.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a legacy protocol implementation returns, move its
status
andip
results to the newstatus-ipv4
andipv4
(orstatus-ipv6
andipv6
) properties.Also remove the now-unused
status
variable definition, and removeip
from the recap.@KLelong Would you please try this to see if it fixes the problem?
fixes #731