net/tstun: remove tailscaled_outbound_dropped_packets_total reason=acl metric for now

Updates #14280

Change-Id: Idff102b3d7650fc9dfbe0c340168806bdf542d76
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2024-12-04 08:41:37 -08:00 committed by Brad Fitzpatrick
parent 2aac916888
commit 74069774be
2 changed files with 5 additions and 4 deletions

View File

@ -876,9 +876,10 @@ func (t *Wrapper) filterPacketOutboundToWireGuard(p *packet.Parsed, pc *peerConf
if filt.RunOut(p, t.filterFlags) != filter.Accept {
metricPacketOutDropFilter.Add(1)
t.metrics.outboundDroppedPacketsTotal.Add(usermetric.DropLabels{
Reason: usermetric.ReasonACL,
}, 1)
// TODO(#14280): increment a t.metrics.outboundDroppedPacketsTotal here
// once we figure out & document what labels to use for multicast,
// link-local-unicast, IP fragments, etc. But they're not
// usermetric.ReasonACL.
return filter.Drop, gro
}

View File

@ -453,7 +453,7 @@ func TestFilter(t *testing.T) {
assertMetricPackets(t, "inACL", 3, metricInboundDroppedPacketsACL)
assertMetricPackets(t, "inError", 0, metricInboundDroppedPacketsErr)
assertMetricPackets(t, "outACL", 1, metricOutboundDroppedPacketsACL)
assertMetricPackets(t, "outACL", 0, metricOutboundDroppedPacketsACL)
}
func assertMetricPackets(t *testing.T, metricName string, want, got int64) {