ICMP实现 ip数据报分片机制还未实现

This commit is contained in:
impact-eintr
2022-11-27 20:34:34 +08:00
parent 5947778dfa
commit 5e317b273a
9 changed files with 280 additions and 13 deletions

View File

@@ -238,10 +238,10 @@ func (s *Stack) FindRoute(id tcpip.NICID, localAddr, remoteAddr tcpip.Address,
defer s.mu.RUnlock()
for i := range s.routeTable {
//if (id != 0 && id != s.routeTable[i].NIC) ||
// (len(remoteAddr) != 0 && !s.routeTable[i].Match(remoteAddr)) {
// continue
//}
if (id != 0 && id != s.routeTable[i].NIC) ||
(len(remoteAddr) != 0 && !s.routeTable[i].Match(remoteAddr)) {
continue
}
nic := s.nics[s.routeTable[i].NIC]
if nic == nil {