diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-01-31 21:59:53 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-31 21:59:53 +0000 |
commit | 7eba61af72ffb31b1bc480b9f7636be90969009d (patch) | |
tree | b2c49d88b8c684e7f23be14fc5be4e8fdc0a721c /pkg/tcpip/network | |
parent | 2dbebbcca90e379842d59c579626a45e32f2603c (diff) | |
parent | 77bf586db75b3dbd9dcb14c349bde8372d26425c (diff) |
Merge release-20200127.0-48-g77bf586 (automated)
Diffstat (limited to 'pkg/tcpip/network')
-rw-r--r-- | pkg/tcpip/network/ipv6/icmp.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/tcpip/network/ipv6/icmp.go b/pkg/tcpip/network/ipv6/icmp.go index 7491cfc41..60817d36d 100644 --- a/pkg/tcpip/network/ipv6/icmp.go +++ b/pkg/tcpip/network/ipv6/icmp.go @@ -408,10 +408,14 @@ func (*protocol) LinkAddressProtocol() tcpip.NetworkProtocolNumber { // LinkAddressRequest implements stack.LinkAddressResolver. func (*protocol) LinkAddressRequest(addr, localAddr tcpip.Address, linkEP stack.LinkEndpoint) *tcpip.Error { snaddr := header.SolicitedNodeAddr(addr) + + // TODO(b/148672031): Use stack.FindRoute instead of manually creating the + // route here. Note, we would need the nicID to do this properly so the right + // NIC (associated to linkEP) is used to send the NDP NS message. r := &stack.Route{ LocalAddress: localAddr, RemoteAddress: snaddr, - RemoteLinkAddress: broadcastMAC, + RemoteLinkAddress: header.EthernetAddressFromMulticastIPv6Address(snaddr), } hdr := buffer.NewPrependable(int(linkEP.MaxHeaderLength()) + header.IPv6MinimumSize + header.ICMPv6NeighborAdvertSize) pkt := header.ICMPv6(hdr.Prepend(header.ICMPv6NeighborAdvertSize)) |