mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-02 18:11:59 +00:00
cmd/tailscale: add --advertise-tags option.
These will be used for dynamically changing the identity of a node, so its ACL rights can be different from your own. Note: Not all implemented yet on the server side, but we need this so we can request the tagged rights in the first place. Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
@@ -21,7 +21,7 @@ func fieldsOf(t reflect.Type) (fields []string) {
|
||||
|
||||
func TestHostinfoEqual(t *testing.T) {
|
||||
hiHandles := []string{
|
||||
"IPNVersion", "FrontendLogID", "BackendLogID", "OS", "Hostname", "RoutableIPs", "Services",
|
||||
"IPNVersion", "FrontendLogID", "BackendLogID", "OS", "Hostname", "RoutableIPs", "RequestTags", "Services",
|
||||
"NetInfo",
|
||||
}
|
||||
if have := fieldsOf(reflect.TypeOf(Hostinfo{})); !reflect.DeepEqual(have, hiHandles) {
|
||||
@@ -140,6 +140,22 @@ func TestHostinfoEqual(t *testing.T) {
|
||||
true,
|
||||
},
|
||||
|
||||
{
|
||||
&Hostinfo{RequestTags: []string{"abc", "def"}},
|
||||
&Hostinfo{RequestTags: []string{"abc", "def"}},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Hostinfo{RequestTags: []string{"abc", "def"}},
|
||||
&Hostinfo{RequestTags: []string{"abc", "123"}},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&Hostinfo{RequestTags: []string{}},
|
||||
&Hostinfo{RequestTags: []string{"abc"}},
|
||||
false,
|
||||
},
|
||||
|
||||
{
|
||||
&Hostinfo{Services: []Service{Service{TCP, 1234, "foo"}}},
|
||||
&Hostinfo{Services: []Service{Service{UDP, 2345, "bar"}}},
|
||||
|
||||
Reference in New Issue
Block a user