diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-09-17 22:41:44 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-17 22:41:44 +0000 |
commit | 09944a80063ffda7bca135a444c76fe613be67b5 (patch) | |
tree | 7099fcf7a19670b81c992fda2930d53bae5d2c6d /pkg/sentry | |
parent | 6392b0f3bea052af0de9d95677233dd9e442dbd5 (diff) | |
parent | 7dacdbef528f7b556f23c1b02a360363dc556e31 (diff) |
Merge release-20210906.0-40-g7dacdbef5 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/socket/netstack/netstack.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index f79bda922..aa081e90d 100644 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -672,13 +672,10 @@ func (s *socketOpsCommon) Bind(t *kernel.Task, sockaddr []byte) *syserr.Error { } a.UnmarshalBytes(sockaddr[:sockAddrLinkSize]) - if a.Protocol != uint16(s.protocol) { - return syserr.ErrInvalidArgument - } - addr = tcpip.FullAddress{ NIC: tcpip.NICID(a.InterfaceIndex), Addr: tcpip.Address(a.HardwareAddr[:header.EthernetAddressSize]), + Port: socket.Ntohs(a.Protocol), } } else { if s.minSockAddrLen() > len(sockaddr) { |