mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-21 07:28:45 +00:00
wgengine/filter: add and clean up documentation.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:

committed by
Dave Anderson

parent
a8589636a8
commit
b950bd60bf
@@ -29,6 +29,7 @@ func (pr PortRange) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
// contains returns whether port is in pr.
|
||||
func (pr PortRange) contains(port uint16) bool {
|
||||
return port >= pr.First && port <= pr.Last
|
||||
}
|
||||
@@ -47,6 +48,7 @@ func (npr NetPortRange) String() string {
|
||||
return fmt.Sprintf("%v:%v", npr.Net, npr.Ports)
|
||||
}
|
||||
|
||||
// NetPortRangeAny matches any IP and port.
|
||||
var NetPortRangeAny = []NetPortRange{{Net: NetAny[0], Ports: PortRangeAny}}
|
||||
|
||||
// Match matches packets from any IP address in Srcs to any ip:port in
|
||||
|
Reference in New Issue
Block a user