diff options
author | Tamir Duberstein <tamird@google.com> | 2019-08-07 10:26:30 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-07 10:27:43 -0700 |
commit | 67a3f4039da1a50dcc4b3e488c663b0d730d4332 (patch) | |
tree | b4ea623a19907a03b84d01ba97398ba99cb8b29c /pkg/tcpip/network/arp/arp.go | |
parent | e70eafc9e5bb5b1ffd6fb7001c2c0d77a5368486 (diff) |
Set target address in ARP Reply
PiperOrigin-RevId: 262163794
Diffstat (limited to 'pkg/tcpip/network/arp/arp.go')
-rw-r--r-- | pkg/tcpip/network/arp/arp.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/tcpip/network/arp/arp.go b/pkg/tcpip/network/arp/arp.go index 60070874d..ea7296e6a 100644 --- a/pkg/tcpip/network/arp/arp.go +++ b/pkg/tcpip/network/arp/arp.go @@ -109,6 +109,7 @@ func (e *endpoint) HandlePacket(r *stack.Route, vv buffer.VectorisedView) { pkt.SetOp(header.ARPReply) copy(pkt.HardwareAddressSender(), r.LocalLinkAddress[:]) copy(pkt.ProtocolAddressSender(), h.ProtocolAddressTarget()) + copy(pkt.HardwareAddressTarget(), h.HardwareAddressSender()) copy(pkt.ProtocolAddressTarget(), h.ProtocolAddressSender()) e.linkEP.WritePacket(r, nil /* gso */, hdr, buffer.VectorisedView{}, ProtocolNumber) fallthrough // also fill the cache from requests |