Some CLI flags support multiple values separated by commas. These flags
are intended to be declared only once and will silently ignore subsequent
instances. This will now throw an error if multiple instances of advertise-tags
and advertise-routes are detected.
Fixes#6813
Signed-off-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
setf.BoolVar(&setArgs.runSSH,"ssh",false,"run an SSH server, permitting access per tailnet admin's declared policy")
setf.StringVar(&setArgs.hostname,"hostname","","hostname to use instead of the one provided by the OS")
setf.StringVar(&setArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\") or empty string to not advertise routes")
setf.Var(&setArgs.advertiseRoutes,"advertise-routes","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\") or empty string to not advertise routes")
setf.BoolVar(&setArgs.advertiseDefaultRoute,"advertise-exit-node",false,"offer to be an exit node for internet traffic for the tailnet")
setf.BoolVar(&setArgs.advertiseConnector,"advertise-connector",false,"offer to be an app connector for domain specific internet traffic for the tailnet")
setf.BoolVar(&setArgs.updateCheck,"update-check",true,"notify about available Tailscale updates")
upf.BoolVar(&upArgs.exitNodeAllowLANAccess,"exit-node-allow-lan-access",false,"Allow direct access to the local network when routing traffic via an exit node")
upf.BoolVar(&upArgs.runSSH,"ssh",false,"run an SSH server, permitting access per tailnet admin's declared policy")
upf.StringVar(&upArgs.advertiseTags,"advertise-tags","","comma-separated ACL tags to request; each must start with \"tag:\" (e.g. \"tag:eng,tag:montreal,tag:ssh\")")
upf.Var(&upArgs.advertiseTags,"advertise-tags","comma-separated ACL tags to request; each must start with \"tag:\" (e.g. \"tag:eng,tag:montreal,tag:ssh\")")
upf.StringVar(&upArgs.hostname,"hostname","","hostname to use instead of the one provided by the OS")
upf.StringVar(&upArgs.advertiseRoutes,"advertise-routes","","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\") or empty string to not advertise routes")
upf.Var(&upArgs.advertiseRoutes,"advertise-routes","routes to advertise to other nodes (comma-separated, e.g. \"10.0.0.0/8,192.168.0.0/24\") or empty string to not advertise routes")
upf.BoolVar(&upArgs.advertiseConnector,"advertise-connector",false,"advertise this node as an app connector")
upf.BoolVar(&upArgs.advertiseDefaultRoute,"advertise-exit-node",false,"offer to be an exit node for internet traffic for the tailnet")
upf.BoolVar(&upArgs.postureChecking,"posture-checking",false,hidden+"allow management plane to gather device posture information")