diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-28 18:53:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-28 18:53:35 +0000 |
commit | 91b955365d69946173b510f727d843103e8c79b6 (patch) | |
tree | 8341174dcbe8a49763cd5e8de119e8abb98da604 /pkg/tcpip/network/ipv4/ipv4.go | |
parent | bbc6f1e84bc71072d8a07187cf6422a488c8c534 (diff) | |
parent | bdd5996a73b14d6f6600ab7aa00cdaed459cab16 (diff) |
Merge release-20200818.0-83-gbdd5996a7 (automated)
Diffstat (limited to 'pkg/tcpip/network/ipv4/ipv4.go')
-rw-r--r-- | pkg/tcpip/network/ipv4/ipv4.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/tcpip/network/ipv4/ipv4.go b/pkg/tcpip/network/ipv4/ipv4.go index 55ca94268..fa4ae2012 100644 --- a/pkg/tcpip/network/ipv4/ipv4.go +++ b/pkg/tcpip/network/ipv4/ipv4.go @@ -486,10 +486,10 @@ func (*protocol) ParseAddresses(v buffer.View) (src, dst tcpip.Address) { } // SetOption implements NetworkProtocol.SetOption. -func (p *protocol) SetOption(option interface{}) *tcpip.Error { +func (p *protocol) SetOption(option tcpip.SettableNetworkProtocolOption) *tcpip.Error { switch v := option.(type) { - case tcpip.DefaultTTLOption: - p.SetDefaultTTL(uint8(v)) + case *tcpip.DefaultTTLOption: + p.SetDefaultTTL(uint8(*v)) return nil default: return tcpip.ErrUnknownProtocolOption @@ -497,7 +497,7 @@ func (p *protocol) SetOption(option interface{}) *tcpip.Error { } // Option implements NetworkProtocol.Option. -func (p *protocol) Option(option interface{}) *tcpip.Error { +func (p *protocol) Option(option tcpip.GettableNetworkProtocolOption) *tcpip.Error { switch v := option.(type) { case *tcpip.DefaultTTLOption: *v = tcpip.DefaultTTLOption(p.DefaultTTL()) |