mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 21:15:39 +00:00
76d99cf01a
It only served to obscure the underlying slice type without adding much value. Signed-off-by: David Anderson <danderson@tailscale.com>
21 lines
580 B
Go
21 lines
580 B
Go
// Copyright (c) 2020 Tailscale Inc & AUTHORS All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package controlclient
|
|
|
|
import (
|
|
"tailscale.com/tailcfg"
|
|
"tailscale.com/wgengine/filter"
|
|
)
|
|
|
|
// Parse a backward-compatible FilterRule used by control's wire
|
|
// format, producing the most current filter format.
|
|
func (c *Direct) parsePacketFilter(pf []tailcfg.FilterRule) []filter.Match {
|
|
mm, err := filter.MatchesFromFilterRules(pf)
|
|
if err != nil {
|
|
c.logf("parsePacketFilter: %s\n", err)
|
|
}
|
|
return mm
|
|
}
|