MCPcopy Index your code
hub / github.com/google/gvisor / RemoveRoutes

Method RemoveRoutes

pkg/tcpip/stack/stack.go:813–818  ·  view source on GitHub ↗

RemoveRoutes removes matching routes from the route table, it returns the number of routes that are removed.

(match func(tcpip.Route) bool)

Source from the content-addressed store, hash-verified

811// RemoveRoutes removes matching routes from the route table, it
812// returns the number of routes that are removed.
813func (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
821func (s *Stack) removeRoutesLocked(match func(tcpip.Route) bool) int {

Callers 4

RemoveInterfaceAddrMethod · 0.80
RemoveRouteMethod · 0.80
TestRemoveRoutesFunction · 0.80

Calls 3

removeRoutesLockedMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 2

TestRemoveRoutesFunction · 0.64