tailcfg: add some comments, remove some redundant types in literal
@@ -513,23 +513,23 @@ type PortRange struct {
// NetPortRange represents a single subnet:portrange.
type NetPortRange struct {
_ structs.Incomparable
- IP string
+ 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},
