summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/fragmentation/reassembler.go
diff options
context:
space:
mode:
authorGhanan Gowripalan <ghanan@google.com>2020-07-31 14:18:18 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-31 14:19:49 -0700
commitade4ff95fc4e0e0ad594ff411658949f13745288 (patch)
tree4f0987dd137221f26829d96d7f57f586de4abfe8 /pkg/tcpip/network/fragmentation/reassembler.go
parentb22c2ab1d769c65bdb8ec789668587559e98f1ae (diff)
Support fragments from different sources
Prevent fragments with different source-destination pairs from conflicting with each other. Test: - ipv6_test.TestReceiveIPv6Fragments - ipv4_test.TestReceiveIPv6Fragments PiperOrigin-RevId: 324283246
Diffstat (limited to 'pkg/tcpip/network/fragmentation/reassembler.go')
-rw-r--r--pkg/tcpip/network/fragmentation/reassembler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/network/fragmentation/reassembler.go b/pkg/tcpip/network/fragmentation/reassembler.go
index 0a83d81f2..50d30bbf0 100644
--- a/pkg/tcpip/network/fragmentation/reassembler.go
+++ b/pkg/tcpip/network/fragmentation/reassembler.go
@@ -32,7 +32,7 @@ type hole struct {
type reassembler struct {
reassemblerEntry
- id uint32
+ id FragmentID
size int
mu sync.Mutex
holes []hole
@@ -42,7 +42,7 @@ type reassembler struct {
creationTime time.Time
}
-func newReassembler(id uint32) *reassembler {
+func newReassembler(id FragmentID) *reassembler {
r := &reassembler{
id: id,
holes: make([]hole, 0, 16),