From 926a43fe518d33e3dfc5e8d82fd26e5d0e4f2853 Mon Sep 17 00:00:00 2001 From: Andrew Dunham Date: Tue, 11 Feb 2025 14:58:57 -0500 Subject: [PATCH] tailcfg: make NetPortRange.Bits omitempty This is deprecated anyway, and we don't need to be sending `"Bits":null` on the wire for the majority of clients. Updates tailscale/corp#20965 Updates tailscale/corp#26353 Signed-off-by: Andrew Dunham Change-Id: I95a3e3d72619389ae34a6547ebf47043445374e1 --- tailcfg/tailcfg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go index b513f3d6c..405eb1a41 100644 --- a/tailcfg/tailcfg.go +++ b/tailcfg/tailcfg.go @@ -1409,7 +1409,7 @@ var PortRangeAny = PortRange{0, 65535} type NetPortRange struct { _ structs.Incomparable IP string // IP, CIDR, Range, or "*" (same formats as FilterRule.SrcIPs) - Bits *int // deprecated; the 2020 way to turn IP into a CIDR. See FilterRule.SrcBits. + Bits *int `json:",omitempty"` // deprecated; the 2020 way to turn IP into a CIDR. See FilterRule.SrcBits. Ports PortRange }