RemoveRoutes removes matching routes from the route table, it returns the number of routes that are removed.
(match func(tcpip.Route) bool)
| 811 | // RemoveRoutes removes matching routes from the route table, it |
| 812 | // returns the number of routes that are removed. |
| 813 | func (s *Stack) RemoveRoutes(match func(tcpip.Route) bool) int { |
| 814 | s.routeMu.Lock() |
| 815 | defer s.routeMu.Unlock() |
| 816 | |
| 817 | return s.removeRoutesLocked(match) |
| 818 | } |
| 819 | |
| 820 | // +checklocks:s.routeMu |
| 821 | func (s *Stack) removeRoutesLocked(match func(tcpip.Route) bool) int { |