summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
AgeCommit message (Collapse)Author
2020-09-29Merge release-20200921.0-60-g48915bded (automated)gVisor bot
2020-09-29Move IP state from NIC to NetworkEndpoint/ProtocolGhanan Gowripalan
* Add network address to network endpoints. Hold network-specific state in the NetworkEndpoint instead of the stack. This results in the stack no longer needing to "know" about the network endpoints and special case certain work for various endpoints (e.g. IPv6 DAD). * Provide NetworkEndpoints with an NetworkInterface interface. Instead of just passing the NIC ID of a NIC, pass an interface so the network endpoint may query other information about the NIC such as whether or not it is a loopback device. * Move NDP code and state to the IPv6 package. NDP is IPv6 specific so there is no need for it to live in the stack. * Control forwarding through NetworkProtocols instead of Stack Forwarding should be controlled on a per-network protocol basis so forwarding configurations are now controlled through network protocols. * Remove stack.referencedNetworkEndpoint. Now that addresses are exposed via AddressEndpoint and only one NetworkEndpoint is created per interface, there is no need for a referenced NetworkEndpoint. * Assume network teardown methods are infallible. Fixes #3871, #3916 PiperOrigin-RevId: 334319433
2020-09-29Merge release-20200921.0-59-g028e045da (automated)gVisor bot
2020-09-28Fix 1 zero window advertisement bug and a TCP test flake.Bhasker Hariharan
In TestReceiveBufferAutoTuning we now send a keep-alive packet to measure the current window rather than a 1 byte segment as the returned window value in the latter case is reduced due to the 1 byte segment now being held in the receive buffer and can cause the test to flake if the segment overheads were to change. In getSendParams in rcv.go we were advertising a non-zero window even if available window space was zero after we received the previous segment. In such a case newWnd and curWnd will be the same and we end up advertising a tiny but non-zero window and this can cause the next segment to be dropped. PiperOrigin-RevId: 334314070
2020-09-28Merge release-20200921.0-58-gba44298a3 (automated)gVisor bot
2020-09-28Fix lingering of TCP socket in the initial state.Nayana Bidari
When the socket is set with SO_LINGER and close()'d in the initial state, it should not linger and return immediately. PiperOrigin-RevId: 334263149
2020-09-28Merge release-20200921.0-56-ga5acc0616 (automated)gVisor bot
2020-09-28Support creating protocol instances with Stack refGhanan Gowripalan
Network or transport protocols may want to reach the stack. Support this by letting the stack create the protocol instances so it can pass a reference to itself at protocol creation time. Note, protocols do not yet use the stack in this CL but later CLs will make use of the stack from protocols. PiperOrigin-RevId: 334260210
2020-09-27Merge release-20200921.0-52-ga376a0baf (automated)gVisor bot
2020-09-26Remove generic ICMP errorsGhanan Gowripalan
Generic ICMP errors were required because the transport dispatcher was given the responsibility of sending ICMP errors in response to transport packet delivery failures. Instead, the transport dispatcher should let network layer know it failed to deliver a packet (and why) and let the network layer make the decision as to what error to send (if any). Fixes #4068 PiperOrigin-RevId: 333962333
2020-09-24Remove useless endpoint constructionTamir Duberstein
PiperOrigin-RevId: 333591566
2020-09-24Merge release-20200914.0-151-g5d50c91c4 (automated)gVisor bot
2020-09-24Change segment/pending queue to use receive buffer limits.Bhasker Hariharan
segment_queue today has its own standalone limit of MaxUnprocessedSegments but this can be a problem in UnlockUser() we do not release the lock till there are segments to be processed. What can happen is as handleSegments dequeues packets more keep getting queued and we will never release the lock. This can keep happening even if the receive buffer is full because nothing can read() till we release the lock. Further having a separate limit for pending segments makes it harder to track memory usage etc. Unifying the limits makes it easier to reason about memory in use and makes the overall buffer behaviour more consistent. PiperOrigin-RevId: 333508122
2020-09-24Merge release-20200914.0-141-ge02e7e999 (automated)gVisor bot
2020-09-23Remove unused field from neighborEntryGhanan Gowripalan
PiperOrigin-RevId: 333405169
2020-09-23Merge release-20200914.0-137-g99decaadd (automated)gVisor bot
2020-09-23Extract ICMP error sender from UDPJulian Elischer
Store transport protocol number on packet buffers for use in ICMP error generation. Updates #2211. PiperOrigin-RevId: 333252762
2020-09-23Merge release-20200914.0-136-gb54dbdfdc (automated)gVisor bot
2020-09-23Merge release-20200914.0-135-gc0f21bb19 (automated)gVisor bot
2020-09-22Merge release-20200914.0-134-gcf3cef117 (automated)gVisor bot
2020-09-22Refactor testutil.TestEndpoint and use it instead of limitedEPArthur Sfez
The new testutil.MockLinkEndpoint implementation is not composed by channel.Channel anymore because none of its features were used. PiperOrigin-RevId: 333167753
2020-09-22Merge release-20200914.0-133-g20dc83c9e (automated)gVisor bot
2020-09-22Merge release-20200914.0-132-g778c36717 (automated)gVisor bot
2020-09-22Move stack.fakeClock into a separate packageToshi Kikuchi
PiperOrigin-RevId: 333138701
2020-09-22Merge release-20200914.0-130-g13a9a622e (automated)gVisor bot
2020-09-22Merge release-20200914.0-129-gf134f873f (automated)gVisor bot
2020-09-21Merge release-20200914.0-127-g059d90b9f (automated)gVisor bot
2020-09-21Merge release-20200914.0-125-g06dbd5b7b (automated)gVisor bot
2020-09-21Merge release-20200914.0-124-g10dcefbc7 (automated)gVisor bot
2020-09-21Merge release-20200914.0-123-ga129204cf (automated)gVisor bot
2020-09-21Merge release-20200914.0-122-gd72022373 (automated)gVisor bot
2020-09-21Merge release-20200907.0-157-gca3087472 (automated)gVisor bot
2020-09-20Merge pull request #3651 from ianlewis:ip-forwardinggVisor bot
PiperOrigin-RevId: 332760843
2020-09-18Merge release-20200907.0-153-g4ba86e625 (automated)gVisor bot
2020-09-18Merge release-20200907.0-151-g6c9989cb8 (automated)gVisor bot
2020-09-18Merge release-20200907.0-150-gc23e39f41 (automated)gVisor bot
2020-09-18Merge release-20200907.0-149-gb8ba0893e (automated)gVisor bot
2020-09-18Merge release-20200907.0-148-gca4ecf481 (automated)gVisor bot
2020-09-18Merge release-20200907.0-147-gf911b43f0 (automated)gVisor bot
2020-09-18Merge release-20200907.0-146-gddf37cb19 (automated)gVisor bot
2020-09-18Merge release-20200907.0-145-gbd69afdcd (automated)gVisor bot
2020-09-18Count packets dropped by iptables in IPStatsKevin Krakauer
PiperOrigin-RevId: 332486383
2020-09-18Merge release-20200907.0-144-gdedef4392 (automated)gVisor bot
2020-09-18Merge release-20200907.0-142-gfcf8d7c6d (automated)gVisor bot
2020-09-18Enqueue TCP sends arriving in SYN_SENT state.Mithun Iyer
TCP needs to enqueue any send requests arriving when the connection is in SYN_SENT state. The data should be sent out soon after completion of the connection handshake. Fixes #3995 PiperOrigin-RevId: 332482041
2020-09-18Merge release-20200907.0-140-gef7d9a6fc (automated)gVisor bot
2020-09-18Merge release-20200907.0-139-g313e1988c (automated)gVisor bot
2020-09-18Merge release-20200907.0-138-g360006d89 (automated)gVisor bot
2020-09-18Use common parsing utilities when sniffingGhanan Gowripalan
Extract parsing utilities so they can be used by the sniffer. Fixes #3930 PiperOrigin-RevId: 332401880
2020-09-18Merge release-20200907.0-137-g07d832dbb (automated)gVisor bot