mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
ipn/policy: mark peerapi4 and peerapi6 as interesting services
This commit is contained in:
parent
39b9ab3522
commit
e698973196
@ -6,12 +6,17 @@
|
|||||||
// shared between the node client & control server.
|
// shared between the node client & control server.
|
||||||
package policy
|
package policy
|
||||||
|
|
||||||
import "tailscale.com/tailcfg"
|
import (
|
||||||
|
"tailscale.com/tailcfg"
|
||||||
|
)
|
||||||
|
|
||||||
// IsInterestingService reports whether service s on the given operating
|
// IsInterestingService reports whether service s on the given operating
|
||||||
// system (a version.OS value) is an interesting enough port to report
|
// system (a version.OS value) is an interesting enough port to report
|
||||||
// to our peer nodes for discovery purposes.
|
// to our peer nodes for discovery purposes.
|
||||||
func IsInterestingService(s tailcfg.Service, os string) bool {
|
func IsInterestingService(s tailcfg.Service, os string) bool {
|
||||||
|
if s.Proto == "peerapi4" || s.Proto == "peerapi6" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if s.Proto != tailcfg.TCP {
|
if s.Proto != tailcfg.TCP {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user