diff options
author | Ghanan Gowripalan <ghanan@google.com> | 2021-09-13 14:40:18 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-13 14:42:49 -0700 |
commit | e07fd058ec474d801748a849d9c5d1c6118c3c11 (patch) | |
tree | 90220570c93945df850284b88c3e29480d5e92a5 /pkg/tcpip/network/ipv6 | |
parent | 79834ce16c5a32b7694c2f00e6bdd0cbdb6b947a (diff) |
Set NICID before delivering packet to raw endpoint
...as raw endpoints expect the packet's NICID to be set.
PiperOrigin-RevId: 396446552
Diffstat (limited to 'pkg/tcpip/network/ipv6')
-rw-r--r-- | pkg/tcpip/network/ipv6/ipv6.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv6/ipv6.go b/pkg/tcpip/network/ipv6/ipv6.go index b1aec5312..d4bd61748 100644 --- a/pkg/tcpip/network/ipv6/ipv6.go +++ b/pkg/tcpip/network/ipv6/ipv6.go @@ -1127,11 +1127,12 @@ func (e *endpoint) handleLocalPacket(pkt *stack.PacketBuffer, canSkipRXChecksum } func (e *endpoint) handleValidatedPacket(h header.IPv6, pkt *stack.PacketBuffer, inNICName string) { + pkt.NICID = e.nic.ID() + // Raw socket packets are delivered based solely on the transport protocol // number. We only require that the packet be valid IPv6. e.dispatcher.DeliverRawPacket(h.TransportProtocol(), pkt) - pkt.NICID = e.nic.ID() stats := e.stats.ip stats.ValidPacketsReceived.Increment() |