mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-06 13:26:49 +08:00
分片机制的单元测试 手动创建了两个ip报文分片 IP层从链路层获取这两个报文的时候会把它们合并成一个ip报文 这里我们不会继续分发给传输层
而是直接写回 将这个完整的ip报文整个包装 虽然这样在fdbase测试会触发错误(超过了1518),但在channel中并没有这个限制 测试通过 成功合并
This commit is contained in:
@@ -388,6 +388,8 @@ func (n *NIC) DeliverNetworkPacket(linkEP LinkEndpoint, remoteLinkAddr, localLin
|
||||
// transport protocol endpoint.
|
||||
func (n *NIC) DeliverTransportPacket(r *Route, protocol tcpip.TransportProtocolNumber, vv buffer.VectorisedView) {
|
||||
log.Println("准备分发传输层数据报")
|
||||
hdr := buffer.NewPrependable(header.EthernetMinimumSize + header.IPv4MinimumSize)
|
||||
r.ref.ep.WritePacket(r, hdr, vv, protocol, 255)
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user