summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix/transport
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2021-01-26 18:02:53 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-26 18:05:29 -0800
commit8e660447410117edd49f41f7aa758e49254ae2d5 (patch)
treef6e683059d5fdb671b79d3bfdd09a1d6769d1da9 /pkg/sentry/socket/unix/transport
parent8bb7d61bdca59b98761b198ec258a6d77441c7ed (diff)
Initialize the send buffer handler in endpoint creation.
- This CL will initialize the function handler used for getting the send buffer size limits during endpoint creation and does not require the caller of SetSendBufferSize(..) to know the endpoint type(tcp/udp/..) PiperOrigin-RevId: 353992634
Diffstat (limited to 'pkg/sentry/socket/unix/transport')
-rw-r--r--pkg/sentry/socket/unix/transport/connectioned.go6
-rw-r--r--pkg/sentry/socket/unix/transport/connectionless.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/socket/unix/transport/connectioned.go b/pkg/sentry/socket/unix/transport/connectioned.go
index dbb7f7c31..b011082dc 100644
--- a/pkg/sentry/socket/unix/transport/connectioned.go
+++ b/pkg/sentry/socket/unix/transport/connectioned.go
@@ -128,7 +128,7 @@ func newConnectioned(ctx context.Context, stype linux.SockType, uid UniqueIDProv
idGenerator: uid,
stype: stype,
}
- ep.ops.InitHandler(ep, nil)
+ ep.ops.InitHandler(ep, nil, nil)
return ep
}
@@ -173,7 +173,7 @@ func NewExternal(ctx context.Context, stype linux.SockType, uid UniqueIDProvider
idGenerator: uid,
stype: stype,
}
- ep.ops.InitHandler(ep, nil)
+ ep.ops.InitHandler(ep, nil, nil)
return ep
}
@@ -296,7 +296,7 @@ func (e *connectionedEndpoint) BidirectionalConnect(ctx context.Context, ce Conn
idGenerator: e.idGenerator,
stype: e.stype,
}
- ne.ops.InitHandler(ne, nil)
+ ne.ops.InitHandler(ne, nil, nil)
readQueue := &queue{ReaderQueue: ce.WaiterQueue(), WriterQueue: ne.Queue, limit: initialLimit}
readQueue.InitRefs()
diff --git a/pkg/sentry/socket/unix/transport/connectionless.go b/pkg/sentry/socket/unix/transport/connectionless.go
index 895d2322e..20fa8b874 100644
--- a/pkg/sentry/socket/unix/transport/connectionless.go
+++ b/pkg/sentry/socket/unix/transport/connectionless.go
@@ -44,7 +44,7 @@ func NewConnectionless(ctx context.Context) Endpoint {
q := queue{ReaderQueue: ep.Queue, WriterQueue: &waiter.Queue{}, limit: initialLimit}
q.InitRefs()
ep.receiver = &queueReceiver{readQueue: &q}
- ep.ops.InitHandler(ep, nil)
+ ep.ops.InitHandler(ep, nil, nil)
return ep
}