summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket
AgeCommit message (Collapse)Author
2020-09-14Merge release-20200907.0-42-g2747030ec (automated)gVisor bot
2020-09-14Merge release-20200907.0-41-g05d2ebee5 (automated)gVisor bot
2020-09-14Merge release-20200907.0-40-g2969b1740 (automated)gVisor bot
2020-09-12Merge release-20200907.0-37-g3ca73841d (automated)gVisor bot
2020-09-11Move the 'marshal' and 'primitive' packages to the 'pkg' directory.Rahat Mahmood
PiperOrigin-RevId: 331256608
2020-09-11Merge release-20200810.0-237-g8d0f76dda (automated)gVisor bot
2020-09-11Merge release-20200907.0-36-g1f4fb817c (automated)gVisor bot
2020-09-11Merge release-20200810.0-236-gb8bee78d0 (automated)gVisor bot
2020-09-11Merge release-20200907.0-35-g325f7036b (automated)gVisor bot
2020-09-11Merge release-20200907.0-34-g490e5c83b (automated)gVisor bot
2020-09-11Merge release-20200907.0-33-g9a5635eb1 (automated)gVisor bot
2020-09-11Merge release-20200907.0-31-g964447c8c (automated)gVisor bot
2020-09-10Merge release-20200818.0-154-g365545855 (automated)gVisor bot
2020-09-10Merge release-20200818.0-152-g7275f293d (automated)gVisor bot
2020-09-10Merge release-20200818.0-149-g9a003835f (automated)gVisor bot
2020-09-10Merge release-20200818.0-148-g1ab097b08 (automated)gVisor bot
2020-09-10Merge release-20200818.0-147-g644ac7b6b (automated)gVisor bot
2020-09-10Merge release-20200818.0-146-g2c7df1a9a (automated)gVisor bot
2020-09-10Merge release-20200818.0-145-gf94995114 (automated)gVisor bot
2020-09-10Merge release-20200810.0-200-gc7d09207e (automated)gVisor bot
2020-09-09Improve type safety for transport protocol optionsGhanan Gowripalan
The existing implementation for TransportProtocol.{Set}Option take arguments of an empty interface type which all types (implicitly) implement; any type may be passed to the functions. This change introduces marker interfaces for transport protocol options that may be set or queried which transport protocol option types implement to ensure that invalid types are caught at compile time. Different interfaces are used to allow the compiler to enforce read-only or set-only socket options. RELNOTES: n/a PiperOrigin-RevId: 330559811
2020-09-09Fix Accept to not return error for sockets in accept queue.Bhasker Hariharan
Accept on gVisor will return an error if a socket in the accept queue was closed before Accept() was called. Linux will return the new fd even if the returned socket is already closed by the peer say due to a RST being sent by the peer. This seems to be intentional in linux more details on the github issue. Fixes #3780 PiperOrigin-RevId: 329828404
2020-09-09Automated rollback of changelist 328350576Nayana Bidari
PiperOrigin-RevId: 329526153
2020-09-09Fix kernfs.Dentry reference leak.Nicolas Lacasse
PiperOrigin-RevId: 329036994
2020-09-09Improve type safety for socket optionsGhanan Gowripalan
The existing implementation for {G,S}etSockOpt take arguments of an empty interface type which all types (implicitly) implement; any type may be passed to the functions. This change introduces marker interfaces for socket options that may be set or queried which socket option types implement to ensure that invalid types are caught at compile time. Different interfaces are used to allow the compiler to enforce read-only or set-only socket options. Fixes #3714. RELNOTES: n/a PiperOrigin-RevId: 328832161
2020-09-09Add function to get error from a tcpip.EndpointGhanan Gowripalan
In an upcoming CL, socket option types are made to implement a marker interface with pointer receivers. Since this results in calling methods of an interface with a pointer, we incur an allocation when attempting to get an Endpoint's last error with the current implementation. When calling the method of an interface, the compiler is unable to determine what the interface implementation does with the pointer (since calling a method on an interface uses virtual dispatch at runtime so the compiler does not know what the interface method will do) so it allocates on the heap to be safe incase an implementation continues to hold the pointer after the functioon returns (the reference escapes the scope of the object). In the example below, the compiler does not know what b.foo does with the reference to a it allocates a on the heap as the reference to a may escape the scope of a. ``` var a int var b someInterface b.foo(&a) ``` This change removes the opportunity for that allocation. RELNOTES: n/a PiperOrigin-RevId: 328796559
2020-09-09ip6tables: (de)serialize ip6tables structsKevin Krakauer
More implementation+testing to follow. #3549. PiperOrigin-RevId: 328770160
2020-09-09Use new reference count utility throughout gvisor.Dean Deng
This uses the refs_vfs2 template in vfs2 as well as objects common to vfs1 and vfs2. Note that vfs1-only refcounts are not replaced, since vfs1 will be deleted soon anyway. The following structs now use the new tool, with leak check enabled: devpts:rootInode fuse:inode kernfs:Dentry kernfs:dir kernfs:readonlyDir kernfs:StaticDirectory proc:fdDirInode proc:fdInfoDirInode proc:subtasksInode proc:taskInode proc:tasksInode vfs:FileDescription vfs:MountNamespace vfs:Filesystem sys:dir kernel:FSContext kernel:ProcessGroup kernel:Session shm:Shm mm:aioMappable mm:SpecialMappable transport:queue And the following use the template, but because they currently are not leak checked, a TODO is left instead of enabling leak check in this patch: kernel:FDTable tun:tunEndpoint Updates #1486. PiperOrigin-RevId: 328460377
2020-09-09remove iptables sockopt special casesKevin Krakauer
iptables sockopts were kludged into an unnecessary check, this properly relegates them to the {get,set}SockOptIP functions. PiperOrigin-RevId: 328395135
2020-09-09Support SO_LINGER socket option.Nayana Bidari
When SO_LINGER option is enabled, the close will not return until all the queued messages are sent and acknowledged for the socket or linger timeout is reached. If the option is not set, close will return immediately. This option is mainly supported for connection oriented protocols such as TCP. PiperOrigin-RevId: 328350576
2020-09-09Fix TCP_LINGER2 behavior to match linux.Bhasker Hariharan
We still deviate a bit from linux in how long we will actually wait in FIN-WAIT-2. Linux seems to cap it with TIME_WAIT_LEN and it's not completely obvious as to why it's done that way. For now I think we can ignore that and fix it if it really is an issue. PiperOrigin-RevId: 328324922
2020-09-09Skip listening TCP ports when trying to bind a free port.Bhasker Hariharan
PiperOrigin-RevId: 327686558
2020-09-09ip6tables: move ipv4-specific logic into its own fileKevin Krakauer
A later change will introduce the equivalent IPv6 logic. #3549 PiperOrigin-RevId: 327499064
2020-09-09Merge release-20200818.0-143-gaead623d9 (automated)gVisor bot
2020-09-09Merge release-20200818.0-140-gfb281eea7 (automated)gVisor bot
2020-09-09Merge release-20200818.0-139-g26439f9a4 (automated)gVisor bot
2020-09-09Merge release-20200818.0-138-g00479af51 (automated)gVisor bot
2020-09-09Merge release-20200818.0-137-g8d3551da6 (automated)gVisor bot
2020-09-08Merge release-20200818.0-135-ga17d083f3 (automated)gVisor bot
2020-09-08Merge release-20200818.0-133-g682c0edcd (automated)gVisor bot
2020-09-08Merge release-20200818.0-132-gc8f1ce288 (automated)gVisor bot
2020-09-08Merge release-20200818.0-131-g284e6811e (automated)gVisor bot
2020-09-08Merge release-20200818.0-130-ga3b87a0ce (automated)gVisor bot
2020-09-08Merge release-20200818.0-128-g38cdb0579 (automated)gVisor bot
2020-09-08Merge release-20200818.0-127-gd35f07b36 (automated)gVisor bot
2020-09-08Improve type safety for transport protocol optionsGhanan Gowripalan
The existing implementation for TransportProtocol.{Set}Option take arguments of an empty interface type which all types (implicitly) implement; any type may be passed to the functions. This change introduces marker interfaces for transport protocol options that may be set or queried which transport protocol option types implement to ensure that invalid types are caught at compile time. Different interfaces are used to allow the compiler to enforce read-only or set-only socket options. RELNOTES: n/a PiperOrigin-RevId: 330559811
2020-09-08Merge release-20200818.0-126-gd84ec6c42 (automated)gVisor bot
2020-09-04Merge release-20200818.0-124-g2202812e0 (automated)gVisor bot
2020-09-04Merge release-20200818.0-122-gb6d6a120d (automated)gVisor bot
2020-09-03Merge release-20200818.0-120-g76e51c8b9 (automated)gVisor bot