Finish SSH
This commit allows SSH rules to be assigned to each relevant not and by doing that allow SSH to be rejected, completing the initial SSH support. This commit enables SSH by default and removes the experimental flag. Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
db6cf4ac0a
commit
9c425a1c08
7 changed files with 254 additions and 117 deletions
|
@ -92,6 +92,16 @@ func (ma MachineAddresses) Prefixes() []netip.Prefix {
|
|||
return addrs
|
||||
}
|
||||
|
||||
func (ma MachineAddresses) InIPSet(set *netipx.IPSet) bool {
|
||||
for _, machineAddr := range ma {
|
||||
if set.Contains(machineAddr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// AppendToIPSet adds the individual ips in MachineAddresses to a
|
||||
// given netipx.IPSetBuilder.
|
||||
func (ma MachineAddresses) AppendToIPSet(build *netipx.IPSetBuilder) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue