(#19764) Fix ipaddress issue scanning beyond the first address#431
Merged
adrienthebo merged 1 commit intopuppetlabs:stablefrom Apr 22, 2013
Merged
Conversation
Without this patch the refactoring of the ipaddress fact in 0e514b8 changed the determination behavior unintentionally. This is a problem because the behavior change caused the setcode block to scan only one address in the output of ifconfig. If the first address is a loopback (127) address, then no additional addresses will be checked. This patch addresses the problem by restoring the behavior of splitting the output of `ifconfig` into lines, then scanning each line. If an address is matched that begins with 127, then scanning continues. Otherwise the matched address is determined to be the ipaddress. The fixture has been extracted from the description of the issue published in the comment at http://git.io/MbXKEg
|
CLA Signed by jeffmccune on 2010-08-16 21:00:00 -0700 |
adrienthebo
added a commit
that referenced
this pull request
Apr 22, 2013
(#19764) Fix ipaddress issue scanning beyond the first address
|
summary: Merged into stable in 8e31013 and merged up into master. This should be released in 1.7.1. Thanks! |
|
Note that this patch was not included in 1.7.1. |
florindragos
pushed a commit
that referenced
this pull request
Jun 15, 2020
* (FACT-2480) Added the File Util module * (FACT-2480) Changed combo of File.readable? and File.read/File.readlines with methods from FileHelper module * (FACT-2480) Added unit tests for when the required files do not exist * (FACT-2480) Fixed rubocop offenses * (FACT-2480) Added the Resolvers Utils in the file_loader.rb * (FACT-2480) Added missing mocks that were breaking the CI * (FACT-2536) Removed unnecessary loaded files * (FACT-2480) Fixed some rubocop offenses Replaced missed file read with open3 with the added safe_read wrapper Solved file loading issue * (FACT-2480) Moved file_helper.rb in facter/util folder * (FACT-2480) Changed FileHelper from a module to a class * (FACT-2480) Added the FileHelper in file_loader.rb * (FACT-2542) Changed how FileHelper is called. Instead of using Facter::Util::FileHelper, now it's Util::FileHelper. Reverted solaris filesystem fact to using open3 instead of reading the file. Co-authored-by: Andrei Filipovici <andrei.filipovici@andreis-mbp.eth.tsr.corp.puppet.net>
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
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.
Without this patch the refactoring of the ipaddress fact in 0e514b8
changed the determination behavior unintentionally. This is a problem
because the behavior change caused the setcode block to scan only one
address in the output of ifconfig. If the first address is a loopback
(127) address, then no additional addresses will be checked.
This patch addresses the problem by restoring the behavior of splitting
the output of
ifconfiginto lines, then scanning each line. If anaddress is matched that begins with 127, then scanning continues.
Otherwise the matched address is determined to be the ipaddress.
The fixture has been extracted from the description of the issue
published in the comment at http://git.io/MbXKEg