-
Notifications
You must be signed in to change notification settings - Fork 770
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
Fix: mac address overflow on windows #3983
Merged
Merged
Conversation
This file contains 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
ZgblKylin
force-pushed
the
patch-1
branch
3 times, most recently
from
November 2, 2023 08:24
788047d
to
8916bca
Compare
PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]>
Sorry for force-pushes, DCO and gpg sign are signed correctly now, no more push needed. |
7 tasks
Update description, adding line:
|
MiguelCompany
previously approved these changes
Nov 13, 2023
@Mergifyio backport 2.11.x 2.10.x 2.6.x |
✅ Backports have been created
|
@richiprosima Please test this |
Signed-off-by: Miguel Company <[email protected]>
@richiprosima Please test windows |
EduPonz
approved these changes
Nov 14, 2023
mergify bot
pushed a commit
that referenced
this pull request
Nov 14, 2023
* Fix: mac address overflow on windows PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> * Fix build error due to windows `min` macro Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]> (cherry picked from commit 2601e95)
This was referenced Nov 14, 2023
EduPonz
pushed a commit
that referenced
this pull request
Dec 2, 2023
* Fix: mac address overflow on windows PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> * Fix build error due to windows `min` macro Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]> (cherry picked from commit 2601e95)
EduPonz
pushed a commit
that referenced
this pull request
Dec 3, 2023
* Fix: mac address overflow on windows PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> * Fix build error due to windows `min` macro Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]> (cherry picked from commit 2601e95) Co-authored-by: Fei Chong <[email protected]>
cferreiragonz
pushed a commit
that referenced
this pull request
Dec 5, 2023
* Fix: mac address overflow on windows PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> * Fix build error due to windows `min` macro Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]> (cherry picked from commit 2601e95)
EduPonz
pushed a commit
that referenced
this pull request
Dec 11, 2023
* Fix: mac address overflow on windows PIP_ADAPTER_ADDRESSES->PhysicalAddressLength will get max up to 8 bytes, but we have only 6 bytes for mac address. In some case, GetAdaptersAddresses() will report address with PhysicalAddressLength=8, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash at DomainParticipantFactory::create_participant() Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> * Fix build error due to windows `min` macro Signed-off-by: Miguel Company <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Signed-off-by: Fei Chong <[email protected]> Signed-off-by: Miguel Company <[email protected]> Co-authored-by: Miguel Company <[email protected]> (cherry picked from commit 2601e95) Co-authored-by: Fei Chong <[email protected]>
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.
Description
This pull request fixed #3982: Mac address overflow in
IPFinder::getAllMACAddress()
on Windows.IP_ADAPTER_ADDRESSES::PhysicalAddressLength
will get max up to 8 bytes, but we have only 6 bytes for mac address.In some case,
GetAdaptersAddresses()
will report address withPhysicalAddressLength=8
, e.g. "Microsoft Teredo Tunneling Adapter", which will cause crash atDomainParticipantFactory::create_participant()
. All 8 bytes ofIP_ADAPTER_ADDRESSES::PhysicalAddress
here are0
in this situation, so use minimal length 6 does not affect the result.This bug fix could be backported to older versions.
This fix is valid for all versions since
v2.6.6
up tomaster
, older versions not checked yet. It should be merged to all branches havingIPFinder::getAllMACAddress()
.Contributor Checklist
New feature has been added to theversions.md
file (if applicable).New feature has been documented/Current behavior is correctly described in the documentation.Reviewer Checklist