Skip to content

Commit

Permalink
ipn/ipnlocal: disallow unsigned peers from WoL
Browse files Browse the repository at this point in the history
Unsigned peers should not be allowed to generate Wake-on-Lan packets,
only access Funnel.

Updates tailscale#6934
Updates tailscale#7515
Updates tailscale#6475

Signed-off-by: James Tucker <james@tailscale.com>
  • Loading branch information
raggi committed Jan 10, 2023
1 parent 237b110 commit 2afa167
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipn/ipnlocal/peerapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,9 @@ func (h *peerAPIHandler) canDebug() bool {

// canWakeOnLAN reports whether h can send a Wake-on-LAN packet from this node.
func (h *peerAPIHandler) canWakeOnLAN() bool {
if h.peerNode.UnsignedPeerAPIOnly {
return false
}
return h.isSelf || h.peerHasCap(tailcfg.CapabilityWakeOnLAN)
}

Expand Down

0 comments on commit 2afa167

Please sign in to comment.