summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/fdbased/endpoint.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/fdbased/endpoint.go')
-rw-r--r--pkg/tcpip/link/fdbased/endpoint.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/tcpip/link/fdbased/endpoint.go b/pkg/tcpip/link/fdbased/endpoint.go
index 8fc009160..4e20cfbf8 100644
--- a/pkg/tcpip/link/fdbased/endpoint.go
+++ b/pkg/tcpip/link/fdbased/endpoint.go
@@ -69,6 +69,8 @@ type Options struct {
ChecksumOffload bool
ClosedFunc func(*tcpip.Error)
Address tcpip.LinkAddress
+ SaveRestore bool
+ DisconnectOk bool
}
// New creates a new fd-based endpoint.
@@ -89,6 +91,14 @@ func New(opts *Options) tcpip.LinkEndpointID {
caps |= stack.CapabilityResolutionRequired
}
+ if opts.SaveRestore {
+ caps |= stack.CapabilitySaveRestore
+ }
+
+ if opts.DisconnectOk {
+ caps |= stack.CapabilityDisconnectOk
+ }
+
e := &endpoint{
fd: opts.FD,
mtu: opts.MTU,