From 4f55ebf2d9007a354ff1dc654e393bdfc68d06dc Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 26 Oct 2020 08:53:07 -0700 Subject: [PATCH] tailcfg: add some comments, remove some redundant types in literal --- tailcfg/tailcfg.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index 2719cb3aa..c7bac3b05 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -513,23 +513,23 @@ type PortRange struct { // NetPortRange represents a single subnet:portrange. type NetPortRange struct { _ structs.Incomparable - IP string - Bits *int // backward compatibility: if missing, means "all" bits + IP string // "*" means all + Bits *int // backward compatibility: if missing, means "all" bits Ports PortRange } // FilterRule represents one rule in a packet filter. type FilterRule struct { - SrcIPs []string + SrcIPs []string // "*" means all SrcBits []int DstPorts []NetPortRange } var FilterAllowAll = []FilterRule{ - FilterRule{ + { SrcIPs: []string{"*"}, SrcBits: nil, - DstPorts: []NetPortRange{NetPortRange{ + DstPorts: []NetPortRange{{ IP: "*", Bits: nil, Ports: PortRange{0, 65535},