summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/raw
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/transport/raw')
-rw-r--r--pkg/tcpip/transport/raw/endpoint.go21
-rw-r--r--pkg/tcpip/transport/raw/raw_state_autogen.go11
2 files changed, 6 insertions, 26 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go
index d9a664c03..eee3f11c1 100644
--- a/pkg/tcpip/transport/raw/endpoint.go
+++ b/pkg/tcpip/transport/raw/endpoint.go
@@ -85,8 +85,6 @@ type endpoint struct {
// Connect(), and is valid only when conneted is true.
route *stack.Route `state:"manual"`
stats tcpip.TransportEndpointStats `state:"nosave"`
- // linger is used for SO_LINGER socket option.
- linger tcpip.LingerOption
// owner is used to get uid and gid of the packet.
owner tcpip.PacketOwner
@@ -532,16 +530,10 @@ func (e *endpoint) Readiness(mask waiter.EventMask) waiter.EventMask {
// SetSockOpt implements tcpip.Endpoint.SetSockOpt.
func (e *endpoint) SetSockOpt(opt tcpip.SettableSocketOption) *tcpip.Error {
- switch v := opt.(type) {
+ switch opt.(type) {
case *tcpip.SocketDetachFilterOption:
return nil
- case *tcpip.LingerOption:
- e.mu.Lock()
- e.linger = *v
- e.mu.Unlock()
- return nil
-
default:
return tcpip.ErrUnknownProtocolOption
}
@@ -593,16 +585,7 @@ func (e *endpoint) SetSockOptInt(opt tcpip.SockOptInt, v int) *tcpip.Error {
// GetSockOpt implements tcpip.Endpoint.GetSockOpt.
func (e *endpoint) GetSockOpt(opt tcpip.GettableSocketOption) *tcpip.Error {
- switch o := opt.(type) {
- case *tcpip.LingerOption:
- e.mu.Lock()
- *o = e.linger
- e.mu.Unlock()
- return nil
-
- default:
- return tcpip.ErrUnknownProtocolOption
- }
+ return tcpip.ErrUnknownProtocolOption
}
// GetSockOptInt implements tcpip.Endpoint.GetSockOptInt.
diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go
index 6a216ccc2..a7ecccb20 100644
--- a/pkg/tcpip/transport/raw/raw_state_autogen.go
+++ b/pkg/tcpip/transport/raw/raw_state_autogen.go
@@ -59,7 +59,6 @@ func (e *endpoint) StateFields() []string {
"closed",
"connected",
"bound",
- "linger",
"owner",
"ops",
}
@@ -81,9 +80,8 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(10, &e.closed)
stateSinkObject.Save(11, &e.connected)
stateSinkObject.Save(12, &e.bound)
- stateSinkObject.Save(13, &e.linger)
- stateSinkObject.Save(14, &e.owner)
- stateSinkObject.Save(15, &e.ops)
+ stateSinkObject.Save(13, &e.owner)
+ stateSinkObject.Save(14, &e.ops)
}
func (e *endpoint) StateLoad(stateSourceObject state.Source) {
@@ -99,9 +97,8 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(10, &e.closed)
stateSourceObject.Load(11, &e.connected)
stateSourceObject.Load(12, &e.bound)
- stateSourceObject.Load(13, &e.linger)
- stateSourceObject.Load(14, &e.owner)
- stateSourceObject.Load(15, &e.ops)
+ stateSourceObject.Load(13, &e.owner)
+ stateSourceObject.Load(14, &e.ops)
stateSourceObject.LoadValue(6, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) })
stateSourceObject.AfterLoad(e.afterLoad)
}