From fd5b52c87ff8fbabf2b293fc95ec9f9f04e5621c Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Fri, 15 Jan 2021 16:46:51 -0800 Subject: Only pass stack.Route's fields to LinkEndpoints stack.Route is used to send network packets and resolve link addresses. A LinkEndpoint does not need to do either of these and only needs the route's fields at the time of the packet write request. Since LinkEndpoints only need the route's fields when writing packets, pass a stack.RouteInfo instead. PiperOrigin-RevId: 352108405 --- pkg/tcpip/stack/packet_buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/tcpip/stack/packet_buffer.go') diff --git a/pkg/tcpip/stack/packet_buffer.go b/pkg/tcpip/stack/packet_buffer.go index 5f216ca21..9d4fc3e48 100644 --- a/pkg/tcpip/stack/packet_buffer.go +++ b/pkg/tcpip/stack/packet_buffer.go @@ -102,7 +102,7 @@ type PacketBuffer struct { // The following fields are only set by the qdisc layer when the packet // is added to a queue. - EgressRoute *Route + EgressRoute RouteInfo GSOOptions *GSO // NatDone indicates if the packet has been manipulated as per NAT -- cgit v1.2.3