From 838640ea2a5e383e5526740d57432987eaece5e0 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Tue, 25 Aug 2026 18:28:29 +0200 Subject: [PATCH] Drop the unused fwmark range accessor --- client/net/fwmark.go | 6 ------ client/net/fwmark_test.go | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/client/net/fwmark.go b/client/net/fwmark.go index f36d951d6..b526feee4 100644 --- a/client/net/fwmark.go +++ b/client/net/fwmark.go @@ -72,12 +72,6 @@ func IsDataPlaneMark(fwmark uint32) bool { return fwmark >= DataPlaneMarkLower && fwmark <= DataPlaneMarkUpper } -// FwmarkRange returns the first and last mark of the range in use, for logging -// and for reporting the configuration back to the user. -func FwmarkRange() (uint32, uint32) { - return fwmarkBase, fwmarkBase | fwmarkOffsetMask -} - func loadFwmarkBase() uint32 { val := os.Getenv(envFwmarkBase) if val == "" { diff --git a/client/net/fwmark_test.go b/client/net/fwmark_test.go index 8b85a082f..2dbebec2a 100644 --- a/client/net/fwmark_test.go +++ b/client/net/fwmark_test.go @@ -47,7 +47,7 @@ func TestParseFwmarkBase(t *testing.T) { // The marks have to stay inside the range the base defines, otherwise a host // that moved the range to dodge a collision would still emit the old values. func TestMarksStayWithinTheRange(t *testing.T) { - lower, upper := FwmarkRange() + lower, upper := fwmarkBase, fwmarkBase|fwmarkOffsetMask marks := map[string]uint32{ "ControlPlaneMark": ControlPlaneMark,