mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-08 22:30:05 +08:00
fdbased还是走不了环回啊
This commit is contained in:
@@ -101,9 +101,6 @@ func (n *NIC) addAddressLocked(protocol tcpip.NetworkProtocolNumber, addr tcpip.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
logger.GetInstance().Info(logger.IP, func() {
|
||||
log.Printf("基于[%d]协议 为 #%d 网卡 添加网络层实现 并绑定地址到: %s\n", netProto.Number(), n.id, ep.ID().LocalAddress)
|
||||
})
|
||||
|
||||
// 获取网络层端的id 其实就是ip地址
|
||||
id := *ep.ID()
|
||||
@@ -133,6 +130,10 @@ func (n *NIC) addAddressLocked(protocol tcpip.NetworkProtocolNumber, addr tcpip.
|
||||
// 注册该网络端
|
||||
n.endpoints[id] = ref
|
||||
|
||||
logger.GetInstance().Info(logger.IP, func() {
|
||||
log.Printf("基于[%d]协议 为 #%d 网卡 添加网络层实现 并绑定地址到: %s\n", netProto.Number(), n.id, ep.ID().LocalAddress)
|
||||
})
|
||||
|
||||
l, ok := n.primary[protocol]
|
||||
if !ok {
|
||||
l = &ilist.List{}
|
||||
|
Reference in New Issue
Block a user