GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow PcapWriteHandler to output PCAP files larger than 2GB by BradleyJ-SAIC · Pull Request #14478 · netty/netty

Conversation

@BradleyJ-SAIC

@BradleyJ-SAIC BradleyJ-SAIC commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

Motivation:

PcapWriteHandler should be able to support large files but is currently limited to 2GB due to the usage of int without wrapping.

Modifications:

segmentNumber and ackNumber are now long values to support uint32 values. segmentNumber and ackNumber wrap around when the uint32 max is reached. Ported unit test from apple/swift-nio-extras#85

Result:

Fixes #11543

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@BradleyJ-SAIC
Allow PcapWriteHandler to output PCAP files larger than 2GB
e7ee122
Motivation:

PcapWriteHandler should be able to support large files but is currently limited to 2Gb due to the usage of int without wrapping.

Modifications:

segmentNumber and ackNumber are now long values to support uint32 values.
segmentNumber and ackNumber wrap around when the uint32 max is reached.
Ported unit test from apple/swift-nio-extras#85

Result:

Fixes issue netty#11543
normanmaurer
normanmaurer requested changes Nov 19, 2024
View reviewed changes
Comment thread handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/DiscardingReadsHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/DiscardingWritesAndFlushesHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/DiscardingWritesAndFlushesHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/DiscardingReadsHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer

normanmaurer commented Nov 19, 2024

Copy link
Copy Markdown
Member

/cc @hyperxpro

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BradleyJ-SAIC
Moving helper classes for test into test class.
da56043
Using assertThat for assertation.
Changing method to static.
hyperxpro
hyperxpro reviewed Nov 19, 2024
View reviewed changes
Comment thread handler/src/main/java/io/netty/handler/pcap/TCPPacket.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

BradleyJ-SAIC
BradleyJ-SAIC commented Nov 20, 2024
View reviewed changes
Comment thread handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

BradleyJ-SAIC
BradleyJ-SAIC commented Nov 20, 2024
View reviewed changes
Comment thread handler/src/main/java/io/netty/handler/pcap/PcapWriteHandler.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

BradleyJ-SAIC added 5 commits November 20, 2024 16:01
@BradleyJ-SAIC
Rollover fixes
9aec4a2
@BradleyJ-SAIC
Unit test cases for TCP rollover.
234811d
Now validating more of the TCP pcap capture.
Reformatted staged files.
@BradleyJ-SAIC
Changed TCP fin to be consistent in PCAP file for client and server.
1815d51
@BradleyJ-SAIC
Large TCP packets are now split so that they fit in the IPv4 packets …
f11917a
…for PcapWriteHandler.

Large UDP packets are now discarded for PcapWriteHandler.
@BradleyJ-SAIC
Merge remote-tracking branch 'origin/4.1' into remove-2gb-pcap-limit
953cfe6
# Conflicts:
#	handler/src/test/java/io/netty/handler/pcap/PcapWriteHandlerTest.java
@BradleyJ-SAIC
BradleyJ-SAIC requested review from hyperxpro and normanmaurer November 21, 2024 18:37
BradleyJ-SAIC added 3 commits November 21, 2024 12:57
@BradleyJ-SAIC
Style failure
317e49f
@BradleyJ-SAIC
Fixes UDP packet not being incorrect when reading ByteBuf. This isn't…
558d905
… a likely real world case.

Previous changes for large TCP packets broke captureZeroLength. This is fixed.
Fixed NPE when handler closed before initialization.
Guarded RST and FIN being written before initialization.
@BradleyJ-SAIC
Re-added UDP ByteBuf releases
a162317
@hyperxpro

hyperxpro commented Nov 26, 2024

Copy link
Copy Markdown
Contributor

Let me test this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer

normanmaurer commented Dec 13, 2024

Copy link
Copy Markdown
Member

@hyperxpro any update ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hyperxpro
hyperxpro approved these changes Dec 13, 2024
View reviewed changes
@hyperxpro

hyperxpro commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

@hyperxpro any update ?

Sorry, this got skipped. Works perfectly :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer merged commit a16f8aa into netty:4.1 Dec 14, 2024
@normanmaurer normanmaurer added this to the 4.1.116.Final milestone Dec 14, 2024
normanmaurer pushed a commit that referenced this pull request Dec 14, 2024
@BradleyJ-SAIC @normanmaurer
Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478)
c0ef562
Motivation:

PcapWriteHandler should be able to support large files but is currently
limited to 2GB due to the usage of int without wrapping.

Modifications:

segmentNumber and ackNumber are now long values to support uint32
values. segmentNumber and ackNumber wrap around when the uint32 max is
reached. Ported unit test from
apple/swift-nio-extras#85

Result:

Fixes #11543
@normanmaurer

normanmaurer commented Dec 16, 2024

Copy link
Copy Markdown
Member

Followup #14588

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

normanmaurer added a commit that referenced this pull request Dec 16, 2024
@normanmaurer @BradleyJ-SAIC
Allow PcapWriteHandler to output PCAP files larger than 2GB (#14478) (#…
6138f11
…14587)

Motivation:

PcapWriteHandler should be able to support large files but is currently
limited to 2GB due to the usage of int without wrapping.

Modifications:

segmentNumber and ackNumber are now long values to support uint32
values. segmentNumber and ackNumber wrap around when the uint32 max is
reached. Ported unit test from
apple/swift-nio-extras#85

Result:

Fixes #11543

Co-authored-by: BradleyJ-SAIC <[email protected]>
This was referenced Sep 14, 2026
Http2: Reserve promised stream for PUSH_PROMISE after local RST_STREAM #17471
Closed
cache failure 1233e4a5 #17565
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@normanmaurer normanmaurer Awaiting requested review from normanmaurer
1 more reviewer
@hyperxpro hyperxpro hyperxpro approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.1.116.Final

Development

Successfully merging this pull request may close these issues.

Make PcapWriteHandler support files bigger than 2 GB

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@BradleyJ-SAIC @normanmaurer @hyperxpro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.