Skip to content
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

Simplified allocation of heap buffer during gateway fetch on win32. #1402

Merged
merged 4 commits into from
May 25, 2024

Conversation

Dimi1010
Copy link
Collaborator

  • Replaced the buffer and buffer2 raw memory allocations with a managed vector.
  • Removed the need of buffer2 via resizing the vector instead.
  • GetAdaptersInfo will no longer be called twice if the first call does not experience buffer overflow.

@Dimi1010 Dimi1010 requested a review from seladb as a code owner May 23, 2024 18:13
@seladb
Copy link
Owner

seladb commented May 24, 2024

@Dimi1010 did you have a chance to test it on Windows? We don't have tests for it unfortunately because it's not easy to run it in CI...

@Dimi1010
Copy link
Collaborator Author

@Dimi1010 did you have a chance to test it on Windows? We don't have tests for it unfortunately because it's not easy to run it in CI...

I see. Haven't tested it yet, thought it was part of the CI. Will test it after I fix the merge conflicts.

@tigercosmos
Copy link
Collaborator

@Dimi1010 did you have a chance to test it on Windows? We don't have tests for it unfortunately because it's not easy to run it in CI...

I am curious about why it is impossible to run it on CI?

…p-device-buffers

# Conflicts:
#	Pcap++/src/PcapLiveDevice.cpp
@Dimi1010
Copy link
Collaborator Author

Dimi1010 commented May 24, 2024

@seladb Tested it on Win10, using local adapter. All tests passed, except TestRawSockets which received a non-critical failure.
image

@seladb
Copy link
Owner

seladb commented May 25, 2024

@Dimi1010 @tigercosmos I apologize, we do have tests for it which we run in CI as well:

PTF_ASSERT_NOT_EQUAL(defaultGateway, pcpp::IPv4Address::Zero);

I'm sorry for the confusion

@seladb seladb merged commit 91497be into seladb:dev May 25, 2024
39 checks passed
@Dimi1010 Dimi1010 deleted the feature/simplify-pcap-device-buffers branch May 25, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants