mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-18 18:54:30 +08:00
fix bug: udp write 提供了对外封装的Write()
表现为一个阻塞操作,如果本地arp缓存失效,就会重新发起一次arp广播,更新目标ip地址的MAC 更新后将再次尝试写数据
This commit is contained in:
@@ -151,7 +151,7 @@ func (*protocol) LinkAddressRequest(addr, localAddr tcpip.Address, linkEP stack.
|
||||
copy(h.HardwareAddressSender(), linkEP.LinkAddress())
|
||||
copy(h.ProtocolAddressSender(), localAddr)
|
||||
copy(h.ProtocolAddressTarget(), addr)
|
||||
|
||||
log.Println("arp发起广播 寻找:", addr)
|
||||
return linkEP.WritePacket(r, hdr, buffer.VectorisedView{}, ProtocolNumber)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user